Skip to main content

Posts

Showing posts with the label cq5

Comparing two AEM installations

There are many situations when you need to compare two AEM instances. The easiest approach is to compare packages, bundles and configurations. Here is how you can do it - Compare package managers  http://localhost:4502/crx/packmgr/service.jsp?cmd=ls Compare Bundles  http://localhost:4502/system/console/bundles.json Compare Configurations  http://localhost:4502/system/console/status-Configurations Compare system properties  http://localhost:4502/system/console/status-System%20Properties You can then compare these manually using any text comparers. Another quicker approach is to compare those using below tools by Aemstuff.com - http://www.aemstuff.com/tools/cti.html http://www.aemstuff.com/tools/coi.html

Reading content from AEM CRX

Large portion of a developer work in any Web content management tool is to display content. Here are the three ways to do so in AEM/CQ5 - 1. Through Properties Object - The properties object is an instance of the ValueMap class and contains all properties of the current resource. For example - properties.get("jcr:title") 2. Through Current Page Object – The currentPage object is an instance of the Page class, which provides some methods to access content. For example - currentPage.getTitle() 3. Through Current Node Object – The currentNode object is an instance of the Node which provides access to content via the getProperty() method. For example - currentNode.getProperty("jcr:title").getString() Here is the complete code snippet for trying all these three options Let’s test this script by requesting a page in Site Admin that implements this “Page component”. Thank you!