Hi Team,
I have need get the all the components in particular path for example
group.p.or=true
group.1_path=/apps/FirstSiteOne/components
group.2_path=/apps/SecondSiteOne/components
group.3_path=/apps/ThirdSiteOne/components
property=jcr:primaryType
property.value=cq:Component
p.limit=-1
p.hits=selective
p.properties=jcr:title componentGroup componentCategory
I am able to get jcr:title componentGroup componentCategory but not able to get path of componenet
How i can get the path of component i tried with sling:resourceType property but in all component we don't have sling:resourceType
If any one know how we can get the path in this scenario plz help
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @manikanthar1295,
Please include jcr:path into your p.properties, so the query will look like this:
group.p.or=true group.1_path=/apps/FirstSiteOne/components group.2_path=/apps/SecondSiteOne/components group.3_path=/apps/ThirdSiteOne/components property=jcr:primaryType property.value=cq:Component p.limit=-1 p.hits=selective p.properties=jcr:title componentGroup componentCategory jcr:path
Hi manikanthar1295
For me it's not very clear what you to achieve with your query.
Do you want to get an overview of all your components below the 3 paths
Or do you want to get an overview of the configured components on content pages?
Greetings
Rik
I need the list of component in this path like jcr:title componentGroup componentCategory and Path of componenet i am not able to get the path of component
Can you try to add jcr:path in the p.properties?
Based on the query builder documentation that should work
Ya if we add jcr:path like below its working fine
p.properties=jcr:title componentGroup componentCategory jcr:path
Hi @manikanthar1295,
Please include jcr:path into your p.properties, so the query will look like this:
group.p.or=true group.1_path=/apps/FirstSiteOne/components group.2_path=/apps/SecondSiteOne/components group.3_path=/apps/ThirdSiteOne/components property=jcr:primaryType property.value=cq:Component p.limit=-1 p.hits=selective p.properties=jcr:title componentGroup componentCategory jcr:path
We can achieve this using groovy. Please check below link.
https://hashimkhan.in/aem-adobecq5-code-templates/groovy-script/
Hope this can help!
Views
Likes
Replies