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

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
SOLVED

Query builder for component path

Avatar

Level 6

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 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

 

View solution in original post

6 Replies

Avatar

Level 2

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

  • /apps/FirstSiteOne/components
  • /apps/SecondSiteOne/components
  • /apps/ThirdSiteOne/components

Or do you want to get an overview of the configured components on content pages?

 

Greetings

Rik

Avatar

Level 6

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

Avatar

Level 6

@RikVanBelle 

 

Ya if we add jcr:path like below its working fine

p.properties=jcr:title componentGroup componentCategory jcr:path

 

Avatar

Correct answer by
Community Advisor

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