I am working on a website where there are multiple templates, one for single column layout, other two column etc. The need is to share common styles across these templates. I created design dialogs, however. since each dialog stores its configuration in its template node in /etc/design, I am not able to share the style selected for one template in the other templates on the same website. Is there a way to store the selection made by authors in design mode for a design dialog at a common location, and access it from all templates (who should be sharing the design styles)?
I apologize in advance if I am missing something obvious. I will appreciate any help.
Design dialog is specific to a component instance but shared across pages which are using same template. Additionally, the design path for each template can be configured using cq:designPath property of the jcr:content node.
Considering the above statement, I don't think design assets could be shared across templates.
Thinking loud, I think there can two solutions to your problem:
a) Either you create the node hierarchy in the design path pertaining to the template using sling (or)
b) You could access the design assets(images/css) not following the design dialog approach as mentioned below
<%= currentDesign.getPath() + "/static/img/icon.gif %>
but may be by storing the design assets at a place which is accessible to all templates. This approach may have its tradeoff with the overlay/override feature of AEM.
Let me know for more information.
Thanks for replying Rishi,
My question (in light of the above example is), is there a way to enforce AEM to store the results of a design dialog selection at a common place, rather than a template specific folder in /etc/design/<this-website-design> folder.
This way I will be able to know exactly where to fetch the chosen logo from in the templates.
Thanks for your help...