How to handle design dialog in editable template ? | Community
Skip to main content
Anderson_Hamer
Level 4
June 21, 2021
Solved

How to handle design dialog in editable template ?

  • June 21, 2021
  • 3 replies
  • 4907 views

I have few components that has design dialog, ex logo, breadcrumb components. These component works in design mode which means these components will work in both classic and touch UI on design mode on static template. But the same will not work in editable template as there is no design mode at all in editable template.  

 

The situation is, I have two websites, website A wants to use editable template and website B wants to use static template. Now how do I design a component in this case, ex logo? Should I keep the design dialog for static template AND keep the same fields in normal dialog for editable template ?

 

Has anyone faced similar issues ? What is the recommendation from AEM to handle situation like this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ChitraMadan

Hi @anderson_hamer ,

 

Design properties in static templates are replaced by policies in editable templates.

 

You can refer to this link for more info on how to define policies - https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/templates/page-templates-editable.html?lang=en

 

Thanks,

Chitra

3 replies

ChitraMadan
Community Advisor
ChitraMadanCommunity AdvisorAccepted solution
Community Advisor
June 21, 2021

Hi @anderson_hamer ,

 

Design properties in static templates are replaced by policies in editable templates.

 

You can refer to this link for more info on how to define policies - https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/templates/page-templates-editable.html?lang=en

 

Thanks,

Chitra

Anderson_Hamer
Level 4
June 21, 2021
Chitra - Yeah, I knew that design properties are replaced by policies in editable templates. But the question here is how do you build design dialog component for both static and editable template?
ibishika
Level 4
June 21, 2021

Refer any core component and copy the design dialog from it. After that just change/add/remove the required properties.

You can refer this: https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/wcm/components/accordion/v1/accordion/_cq_design_dialog/.content.xml

Asutosh_Jena_
Community Advisor
Community Advisor
June 22, 2021

Hi @anderson_hamer 

 

You can keep the _cq_design_dialog in your component and when the component will be used on the static template, the fields will be available/visible when you are on design mode. In case of editable template, the fields will not be visible by default. You need to go to the template policy and enable the fields and after enabling the policy, the field will be available for authoring in editable template as well.

 

You can take the example from Accordion component here:

https://github.com/adobe/aem-core-wcm-components/tree/master/content/src/content/jcr_root/apps/core/wcm/components/accordion/v1/accordion

 

Thanks!