How to handle design dialog in editable template ? | Adobe Higher Education
Skip to main content
Anderson_Hamer
Level 4
June 21, 2021
Respondido

How to handle design dialog in editable template ?

  • June 21, 2021
  • 3 respostas
  • 4907 Visualizações

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?

Este tópico foi fechado para respostas.
Melhor resposta por 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 Respostas

ChitraMadan
Community Advisor
ChitraMadanCommunity AdvisorResposta
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

ChitraMadan
Community Advisor
Community Advisor
June 22, 2021

Hi @anderson_hamer,

You cannot use design dialog for both static and editable templates.So, you can keep the existing static template and design dialog as is and in addition, create an editable template with same policies as defined in design_dialog.

Website A will use new editable template and Website B can continue to use static 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!