The Diff module enhances Magnolia core versioning functionality. The module uses the daisydiff Java library to compare two HTML files. Insertions are highlighted in green and deletions in red. Users can see exactly what has changed between two versions of the same content. The module is used by the Pages app to compare page versions. Line-by-line text comparison and changes in asset selection allow editors and publishers to see at a glance exactly what has changed. Diff functionality can also be enabled to compare changes to templates and resources edited in-line in the Standard Templating Kit.
Please note that the artifact's IDs (Maven
artifactId) have changed since Magnolia 5.5.
If you have custom Java code relying on this module, you need to install a compatibility module too.
To be sure - please check the module on our Bitbucket server.
Maven is the easiest way to install the module. Add the following dependency to your bundle:
Note the changes in
artifactId since the 2.0 release.
<dependency> <groupId>info.magnolia.diff</groupId> <artifactId>magnolia-diff</artifactId> <version>2.0</version> </dependency>
Pre-built jars are also available for download. See Installing a module for help.
With Magnolia 5.6 we've begun removing the old Content API from our modules. If you have custom code relying on classes from the old diff module then you must do one of two things:
- Update your code for the new version of the diff module.
- Or you can use the
magnolia-diff-compatibilitymodule together with the
Add the following snippet to you pom file:
<dependency> <groupId>info.magnolia.diff</groupId> <artifactId>magnolia-diff-compatibility</artifactId> <version>2.0</version> </dependency>
Add these jar files to the
WEB-INF/lib folder of your webapp:
In most circumstances the Diff module requires no configuration.
You can configure the default settings for headers, cookies, host and port. See Diff implementation.