Some background: I'm trying to create a sliding navigation component on the left for a responsive website. I want to include an image, configured using a design_dialog, next to all items in the menu.
I am running CQ 5.6.1
The problem I'm running into, is I currently have "homepage", "contentpage" and "contactpage" templates. All 3 are being rendered with their like-named components, which are being derived from a base "page" component.
In this page component, I have a body.jsp that is including my navpanel component. Everything works fine, but when setting the images in the navpanel while on the home page, they do not show on the other two.
I know the reason for this is because the navpanel design path is: /etc/designs/testsite/jcr:content/homepage/navpanel
In body.jsp, when including navpanel, I tried setting the path variable in the cq:include to an absolute path (ie /etc/designs/testsite/jcr:content/navpanel), since according to the API, it should take an absolute path and not modify it at all. Instead, when outputting currentStyle.getPath(), it continues to show the first path (which includes homepage).
To achieve my goal, I need to be able to configure the design path for this component to be on a 'global' level and not nested within the templates design.
Is there a programmatic way of changing this value? Does it sound like there is a bug with the cq:include path not behaving as intended?