Expand my Community achievements bar.

SOLVED

Is there a way we can make a component available through code in static templates ?

Avatar

Level 4

Is there a way we can make a component available through code in static templates by default without modifying through design mode in 6.4 version?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

you can do it for static template by updating the /etc/designs/your-site-pages/jcr:content.xml and provide the allowed components name in components property.

If you go on design mode of your page and add the components there for the parsys you can see those values for the pages inside /etc/designs/your-site-pages/jcr:content.xml

View solution in original post

4 Replies

Avatar

Community Advisor

Yes you can, For that you need to write Policy under conf/my-project/settings/wcm/policies/.content.xml

and map them with the template policy.
You can set policy in your local and pull it into your code to make it easy. This can be done by the repo tool.

Policy Setup by Authoring: https://www.linkedin.com/pulse/intro-editable-templates-aem-63-joanne-ho/ 

Repo Tool: https://github.com/Adobe-Marketing-Cloud/tools/tree/master/repo 

 

 

Avatar

Level 4

Hi @Sady_Rifat ,

 

I want to make the component available throght code for static template and not editable template.

 

Thanks,

Chinmayi

Avatar

Correct answer by
Community Advisor

you can do it for static template by updating the /etc/designs/your-site-pages/jcr:content.xml and provide the allowed components name in components property.

If you go on design mode of your page and add the components there for the parsys you can see those values for the pages inside /etc/designs/your-site-pages/jcr:content.xml

Avatar

Community Advisor

@chinmayis865517 I feel you only have limited options for this..

 

1. Add in design mode via UI (not your choice)

2. Add same to your etc node programmatically.

3. If you already added any component group instead of component resource types for each component then you can mark your new component to existing added group.