| Hippo CMS version | 6.03.07 and later |
Configuration
Creating a link from one document to another will create a dependency between those documents.
If you would delete the second document, you would create a broken link without noticing.
There is a way to prevent this. The code is available in the CMS, but it needs some (repository) configuration:
- Set the property cms.references.view to on in the build.properties of Hippo CMS, and rebuild it.
cms.references.view=on
- Your repository/namespace configuration will contain an extractors.xml file which contains your defined extractors. For this referential check to work you will need to have the MultiValueXMLPropertyExtractor defined for the "references" property (see the example below).
<extractor classname="nl.hippo.slide.extractor.MultiValueXMLPropertyExtractor" uri="/files/default.preview" content-type="text/xml | text/xml; charset=UTF-8 | application/xml"> <configuration> <instruction property="references" namespace="http://hippo.nl/cms/1.0" xpath="//@href|//@src"/> </configuration> </extractor>
As you might have noticed the xpath gets the values of the links/references to other items/objects.
I you would like to use this feature, you will need to set the correct xpath for all the XML attributes or elements that can contain the value of a reference. - You also need to configure the indexer to index the reference property as text and with a specific analyzer. You will need to change domain.xml and add the following rule.
<property namespace="http://hippo.nl/cms/1.0" name="references" type="text" analyzer="nl.hippo.slide.index.analysis.LowercaseCommaSeparatedAnalyzer"/>