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.
Solved! Go to Solution.
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.
Refer above documentation for the querybuilder.
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
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.
Hope this helps.
Thanks,
Ravi Joshi
Page.html/jcr:content/par/components list is there. This means these are page level components? Or at template level
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
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.
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?
I want to know what all the components are coming from that static template on page
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.
Refer above documentation for the querybuilder.
Hi ,
For allowed components can you please check the cq:designPath from the static template.
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>
.
Views
Likes
Replies
Views
Likes
Replies