Components from static template | Community
Skip to main content
Level 6
January 4, 2023
Solved

Components from static template

  • January 4, 2023
  • 5 replies
  • 2414 views

Hi,

How to check what all components coming on a page from static template.

Can anyone guide what are the components coming from static template after creating the page.

 

 

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 SantoshSai

Hi @vani1012,

Page Decomposition

You can check those component references by appending ?debug=layout querystring at the end of url.

eg. http://localhost:4502/editor.html/content/mysite/us/en.html?debug=layout

It gives all the references of component which has been used on the page as below.

For more details please visit: https://www.techinnovia.com/aem-components/

Hope that helps!

Regards,

Santosh

5 replies

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
January 4, 2023

Hi @vani1012,

Page Decomposition

You can check those component references by appending ?debug=layout querystring at the end of url.

eg. http://localhost:4502/editor.html/content/mysite/us/en.html?debug=layout

It gives all the references of component which has been used on the page as below.

For more details please visit: https://www.techinnovia.com/aem-components/

Hope that helps!

Regards,

Santosh

Santosh Sai
Ravi_Joshi
Level 4
January 4, 2023

Hi @vani1012 ,

 

When creating a page using a static template, it usually dumps the entire template node structure (with no content) on the page.

 

After the page creation, there is no dynamic connection between the template and the page.

 

So to identify which component is dumped on the page from the template we might need to cross-examine the node structure. 

 

Or, usually, we can segregate both the components by the "parsys" node. So the components available under parsys (with content) are treated as page-level components and the components not under parsys (with no content) are treated as template-level components.

 

Reference: https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/templates/page-templates-static.html?lang=en 

 

Hope this helps.

 

Thanks,

Ravi Joshi

Vani1012Author
Level 6
January 4, 2023

Page.html/jcr:content/par/components list is there. This means these are page level components? Or at template level

 

 

 

Ravi_Joshi
Level 4
January 4, 2023

Hi @vani1012 ,

 

Most probably yes. If the resourceType of the "par" is targeting to the "parsys".

 

If possible can you please share a snapshot of the "Page.html/jcr:content/par/components"?

 

Thanks,

Ravi Joshi

Suraj_Kamdi
Community Advisor
Community Advisor
January 4, 2023

@vani1012 Can you please elaborate more on this so that we will get to know the actual requirement?

Mani_kumar_
Community Advisor
Community Advisor
January 4, 2023

Hi @vani1012 

Do you want to know what is the count of components on static template ?

What exactly is the requirement here could you please give more information what you want to achieve?

Vani1012Author
Level 6
January 4, 2023

I want to know what all the components are coming from that static template on page

Mani_kumar_
Community Advisor
Community Advisor
January 4, 2023

Hi @vani1012 

You can use the querybuilder approach to query based on the template and page conditions and get the list of components on specific template and specific page.

https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/query-builder/querybuilder-api.html?lang=en

Refer above documentation for the querybuilder.

Level 3
January 5, 2023

Hi ,

 

For allowed components can you please check the cq:designPath from the static template.

 

  • Page/component design

For static template, design is stored at /etc/designs/<my-site>/jcr:content/<page-component-name>/<component-name> (if page has a design path of /etc/designs/<my-site>) or /etc/designs/default/jcr:content/<page-component-name>/<component-name>.