Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Version of pages - and the visual difference page function

Avatar

Former Community Member

Hi,

  In the version tab in the sidekick, when we do a diff between versions of pages, none of our custom components show any differences.

Do custom components need to do something explicit to fit in with this diff functionality?

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 8

Generally yes you need to make an effort in your custom components to generate the diff information. How hard this is to do depends on which version of the product. 

In 5.6 the out of the box components use the cq:text tag which handles the the diff functionality. If you aren't using the cq:text tag then you have to handle the diff logic yourself. 

In 5.6 for images the Image bean (com.day.cq.wcm.foundation.Image) will handle this as well (it adds a query string parameter like ?cq_diffTo=1.0). 

In older versions of the project supporting diff is more complex - you write a lot of more scriptlet code or have to write your own tag library. There is a service that provides help to components for this - https://dev.day.com/docs/en/cq/current/javadoc/index.html?com/day/cq/commons/DiffService.html

View solution in original post

2 Replies

Avatar

Level 2

Diff is something you have to manually do on a component basis. Take a look at the foundation title - it can be quite involved...

Avatar

Correct answer by
Level 8

Generally yes you need to make an effort in your custom components to generate the diff information. How hard this is to do depends on which version of the product. 

In 5.6 the out of the box components use the cq:text tag which handles the the diff functionality. If you aren't using the cq:text tag then you have to handle the diff logic yourself. 

In 5.6 for images the Image bean (com.day.cq.wcm.foundation.Image) will handle this as well (it adds a query string parameter like ?cq_diffTo=1.0). 

In older versions of the project supporting diff is more complex - you write a lot of more scriptlet code or have to write your own tag library. There is a service that provides help to components for this - https://dev.day.com/docs/en/cq/current/javadoc/index.html?com/day/cq/commons/DiffService.html