Archive for November, 2014

CQ5 / AEM: Simulating Publish on Author

29.11.2014
Christoph Thommen

For the first blog post, we have something small but quite handy:

Some components in CQ are administered in one place and displayed in multiple places.

This post shows how you can display a section of content without the authoring capabilities to improve the author experience.
At the same time, we omit any html decoration tags usually included on the author, this often makes it easier to make advanced html markup look nice on author.

To do this, we need two imports in our jsp file:

Then, before the section to be displayed like on publish, place the following code:

To revert back to regular author mode, add this piece of code:

done!