Hi All,
is there an effective way to identify unused components/templates from a legacy CQ project.
Jon
Solved! Go to Solution.
You can write a query using sling:resourceType in the path '/content/<project> for the component / templates you are looking for. If it returns '0', then it will not be used
You can write a query using sling:resourceType in the path '/content/<project> for the component / templates you are looking for. If it returns '0', then it will not be used
As @bsloki mentioned write a simple query in your aem @ http://localhost:4502//libs/cq/search/content/querydebug.html
Here is one sample query:
path=/content/blog type=cq:PageContent property=cq:template property.value=/apps/blog/templates/homepage
If you need help, refer to query builder documentation @ https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html
bsloki wrote...
You can write a query using sling:resourceType in the path '/content/<project> for the component / templates you are looking for. If it returns '0', then it will not be used
Is there a way to list out all used/unused templates from the content folder? This would help us to search with templates names one by one.
Thanks in advance
Views
Replies
Total Likes
There is nothing OOB, you will have to write your own custom query for this.
ex: See if you can use some joins or you can fetch all the templates and loop through the same query for each template
Views
Likes
Replies