CQ5.3: How to add a custom page extension

Question

How do I use a custom page extension on my page in CQ5.3? For example, I want to use page.foo instead of page.html for certain pages in my site.

Answer, Resolution

In CQ5.3 there are a set of scripts under /libs/foundation/components/primary. These scripts are mapped to primary node types. In the case of cq:Page you would look under /libs/foundation/components/primary/cq/Page to find all scripts mapping to cq:Page.

Following this new structure, if you would like to add a custom extension "foo" then you could do so by creating a script /apps/foundation/components/primary/cq/Page/Page.foo.jsp. The contents of this script would be the following:

<%@include file="/libs/foundation/components/primary/cq/Page/proxy.jsp" %>

The include of proxy.jsp above handles forwarding to the jcr:content subnode of the cq:Page node.

Applies to

CQ5.3

 Adobe

Get help faster and easier

New user?