design cell path discrepancy between design_dialog and currentStyle.getPath
CQ 5.6.1 - In a nutshell, the design cell path generated by a component's design_dialog doesn't match the component's "currentStyle.getPath()". This makes retrieving properties,via...
currentStyle.get(String name, T defaultValue)
...always return the default value.
I'm trying to figure out if this problem is a conceptual misunderstanding on my part, or a result of how I've set up my hierarchy, or a problem elsewhere.
I have a component statically referenced on my page component with:
<cq:include path="quick-links" resourceType="company/components/menus/quick-links" />
In this "quick-links" component, I have two additional component references:
<cq:include path="quick-links-title" resourceType="company/components/heading" /> <cq:include path="quick-links-parsys" resourceType="company/components/parsys" />
Inside "quick-links-parsys", I permit a component called "quick-links-button". This component has a design_dialog that lets the user establish a path to a library of icons for that particular type of button.
When I visit the design_dialog and enter a value, it gets written to:
/etc/designs/company/jcr:content/mypage/quicks-links/quick-links-parsys/quick-link-button@icon-library-path = "/path/to/icons"
...which fits my current understanding of how things work.
However, when I try retrieve this value in the quick-link-button component with:
<%=currentStyle.get("icon-library-path", "unset")%>I alway get back "unset". When I echo currentStyle.getPath() I get this back:
/etc/designs/company/jcr:content/mypage/quick-links-parsys/quick-link-button
...which is different than where I'm expecting, and explains why my property always comes back as unset. The "/quick-links/" part in "/etc/designs/company/jcr:content/mypage/quick-links/quick-links-parsys/quick-link-button" is missing.
What's going on here? Is this expected? The design dialog is forming the cell path one way and currentStyle is resolving it another. Can I correct this? The KB entry at http://helpx.adobe.com/experience-manager/kb/DesigneCellId.html didn't really help me at all, but I don't *think* it applies. Why is the "/quick-links/" part of the path missing from what currentStyle.getPath() is reporting?
Thank you for any suggestions!
Garth