Day CQ mailing list is: http://groups.google.com/group/day-communique
If the resource, /products/my-first-product , has sling:resourceType = /apps/foo/product, then, to render .html version of the resource, /apps/foo/product/html.jsp will be used. To render simple.html version of the resource, /apps/foo/product/simple.html.jsp will be used. You can do whatever you want in those .jsp files. I am not sure about inheritance. You can set /products/my-first-product's sling:resourceSuperType = /apps/foo/page .. But I am not sure if that will help for your script resolution (using <sling:include/>). Since you are using CQ, you may want to look at <cq:include/>. On Thu, Mar 31, 2011 at 7:49 AM, Marco Dohnke <[email protected]>wrote: > Hi, > > I created two (CQ5.4) components 'page' and 'product'. I want to inherit > product from page and overwrite i.e. the center.jsp of the page component. I > also want to make sure you can call two 'views' of the product component. > Therefore I tried to use a selector: > > /products/my-first-product.html -> renders default script > /products/my-first-product.simple.html -> renders a more simple version > > If I use a simple.jsp, Sling is calling this script, but I lose the > inheritance (not DRY). Is there any chance to use both? I want to inherit > some parts of the page component, other parts shall be overwritten. How can > I realize this? > > Kind regards, > Marco >
