Search code examples
aem

AEM 6.2 How to change template of a page


I have created live copy of a page branch from sample website, inside my website. I was just trying to update the template so that I can create a local copy of the template used with original page and then change the UI. I can see the property with the cq:template and sling:resourceType as component name in development environment(CRXDE Lite). Can anyone suggest if we can update the property to change the template and component or if there any other way to change the template.


Solution

  • You can update cq:template and sling:resourceType on page/jcr:content node with corresponding new values and it would effectively change the template of page.

    you might run into errors if code on new page component is expecting a different content than what is currently under your jcr:content.

    ps- I dont know what your use case is but this would be very crude approach and should be avoided.