Allow Components for Static template in AEM 6.5 | Adobe Higher Education
Skip to main content
Shivam153
Level 3
March 7, 2023

Allow Components for Static template in AEM 6.5

  • March 7, 2023
  • 5 の返信
  • 3274 ビュー

Hi, I have a requirement to allow particular component inside Parsys for Static Template. How can we achieve this?

Whenever we create a page based on that template, it should allow to add that particular component in Parsys in edit mode.

このトピックへの返信は締め切られました。

5 の返信

Jagadeesh_Prakash
Community Advisor
Community Advisor
March 7, 2023
Shivam153
Shivam153作成者
Level 3
March 7, 2023

Hello @jagadeesh_prakash, Thanks for replying. The article you mentioned is more focused on editable template and it does not tell about adding policy to add particular component from parsys.

TarunKumar
Community Advisor
Community Advisor
March 7, 2023

Hi @shivam153 ,

You should be able to allow components in static template. Just make sure you give the proper resource type path for the component that is being allowed.
So basically, in the apps folder where you have created your static template you should follow the type of structure.

 

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:description="Template with allowed components." jcr:primaryType="cq:Template" jcr:title="Static template" allowedPaths="[/content/. *]" ranking="{Long}100"> <jcr:content jcr:primaryType="cq:PageContent" sling:resourceType="<your structure component path>"> <logo jcr:primaryType="nt:unstructured" sling:resourceType="apps/components/structure/logo"/> <title jcr:primaryType="nt:unstructured" sling:resourceType="apps/components/content/title"/> </jcr:content> </jcr:root>

 

So in the above allowed components are added inside the "jcr:content" . These are the dummy data you can replace it with your actual data.
Hope this helps!

Shivam153
Shivam153作成者
Level 3
March 7, 2023

@tarunkumar  Thanks for replying. For a single component to add, it will work, but I want to add a parsys and then need to restrict that particular component.

Kiran_Vedantam
Community Advisor
Community Advisor
March 7, 2023

Hi @shivam153 

 

Please check my answer here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/allowed-components-in-design-mode-6-5-for-static-template/td-p/389388

 

You can add the components in design mode and get the code from /etc.

 

Hope it helps!

Thanks,
Kiran Vedantam.

DPrakashRaj
Community Advisor
Community Advisor
March 9, 2023

go on design mode of page, this will allow you to add/remove components for any parsys. design mode can be selected from authoring page and changing it from top right corner

Shivam153
Shivam153作成者
Level 3
March 10, 2023

Hi All, Thanks for all the response. I have found the solution for it.

Inside design folder, we can define following properties to get component in our responsive grid, By doing that, we don't have to manually add our component in design mode.