| Hippo CMS version | 6.04.00+ |
Asset workflow and versioning in Hippo CMS
Configuration
- First make sure you have enabled version management in the Hippo CMS.
- In the build.properties of Hippo CMS, add
cms.use.assets.workflow=on
- Optionally, you can have versions created automatically on publication and/or unpublication. To use this, add a ConstantExtractor to extractors.xml in the repository namespace configuration. Note that you need to make sure the uri matches your repository layout - for the default layout as shipped with hippo-repository, the following will work:
<extractor classname="nl.hippo.slide.extractor.ConstantExtractor" uri="/files/default.preview/binaries" content-type="image/jpeg|image/gif|application/pdf|application/msword"> <configuration> <instruction property="createVersionOnPublication" namespace="http://hippo.nl/cms/1.0" value="true"/> </configuration> </extractor> <extractor classname="nl.hippo.slide.extractor.ConstantExtractor" uri="/files/default.preview/binaries" content-type="image/jpeg|image/gif|application/pdf|application/msword"> <configuration> <instruction property="createVersionOnUnpublication" namespace="http://hippo.nl/cms/1.0" value="true"/> </configuration> </extractor>
|
When enabling this feature you shouldn't read binaries from the repository using the repository-binary:your_repository_name:// protocol, since this will always load binaries from the preview. Use repository:// instead. This will be fixed in HippoCocoon version 2.1.8.14 |
More info
A version of an asset (say /default/files/default.preview/binaries/foo/bar.gif) will be saved under the correponding path in the .history repository. The version asset will be one level deeper than the original asset: /default/files/default.history/foo/bar.gif/1.gif for version 1. So /default/files/default.history/foo/bar.gif is a collection, with all the versions as numbered child assets (1.gif, 2.gif, 3.gif, etc.) under it.