Version of pages - and the visual difference page function | Community
Skip to main content
October 16, 2015
Solved

Version of pages - and the visual difference page function

  • October 16, 2015
  • 2 replies
  • 1731 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by PaulMcMahon

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

2 replies

Level 2
October 16, 2015

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

PaulMcMahonAccepted solution
Level 8
October 16, 2015

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