Enabling versioning in content apps
Magnolia versions pages, assets and contacts by default when they are published and unpublished. You can also configure versioning for any other content type.
A fresh Magnolia installation does not have versioned content. Demo
content is bootstrapped and immediately marked as
You can enable versioning in a content app by triggering the
activate/deactivate command chains in the
versions catalog instead of the
activate/deactivate commands in the
default catalog. Here is the process to enable versioning in the
In the Configuration app >
/deactivatenodes add a
catalogproperty and set the value to
versioned. This calls the chained version command configured in the
Add the Show versions action configuration.
/actionsnode add the
/showVersionsconfiguration as shown below. Alternatively, you can simply extend the configuration in another content app, for example the configuration in the Contacts app configured in
Add the Show versions action to the action bar.
/actionbar/sections/category/groupsnode, add the
/versionsActionsconfiguration shown below. Alternatively, you can simply extend the configuration in another content app, for example, the configuration in the Contacts app configured in
In the Categories app, create a few versions by publishing and unpublishing an item and then execute the Show versions action to open the VERSIONS dialog.
The number of versions you can create depends on the Magnolia edition:
In the Community Edition, the number of versions is set to 3 and this is not configurable.
In DX Core, the number of versions is unlimited and you can set it in the configuration. By default, 10 versions are stored.
The number of versions is configured in
activeenables and disables versioning.
maxVersionIndexsets the number of versions to store.
Previous versions are deleted when you change to a smaller number and create a version. It’s OK to change the number. The index won’t be affected until a new version is created. For example, if node `A' has 10 versions and you change the max version index to 2, you will still see all 10 versions until the next versioning occurs. Once node `A' is versioned again, all previous 9 versions will be removed.
Versions are created when VersionCommand is triggered.
A new version of the content is created and added to the version file.
VersionCommand provides for standard and recursive versioning, and the
addition of a version comment.