Added by Jeroen Reijn, last edited by Jasha Joachimsthal on Aug 27, 2007  (view change)

Labels:

hippocms hippocms Delete
references references Delete
linkcheck linkcheck Delete
linkchecker linkchecker Delete
internallinks internallinks Delete
related related Delete
documents documents Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
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:

  1. Set the property cms.references.view to on in the build.properties of Hippo CMS, and rebuild it.
    cms.references.view=on
    
  2. 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.

  3. 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"/>

Screenshot