Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Components from static template

Avatar

Level 6

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.

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 9

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

Refer above documentation for the querybuilder.

View solution in original post

10 Replies

Avatar

Community Advisor

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.

screencapture-localhost-4502-editor-html-content-mysite-us-en-html-2023-01-04-09_45_52.png

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

Hope that helps!

Regards,

Santosh

Avatar

Level 5

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

 

Hope this helps.

 

Thanks,

Ravi Joshi

Avatar

Level 6

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

 

 

 

Avatar

Level 5

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

Avatar

Community Advisor

As you have already pointed out, there is no connection between default node from template and content node structure once the content is authored. Therefore, it is impossible to differentiate between components that come from a template and those that come from manual authoring.

 

As such, to check the current state, you must refer to the page component and its cq:template node (if any for the page component) and the template structure.

 

Avatar

Community Advisor

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

Avatar

Level 9

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?

Avatar

Correct answer by
Level 9

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

Refer above documentation for the querybuilder.

Avatar

Level 4

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