Expand my Community achievements bar.

SOLVED

How to handle design dialog in editable template ?

Avatar

Level 4

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?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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-tem...

 

Thanks,

Chitra

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

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-tem...

 

Thanks,

Chitra

Avatar

Level 4
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?

Avatar

Community Advisor

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.

Avatar

Level 6

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/...

Avatar

Community Advisor

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/...

 

Thanks!