Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

How can I obtain child nodes from a root node of type rep:User??

Avatar

Employee

I trying to get childNodes from the users through a querybuilder with (nodedepth) but doesn't work, someone can help me with a solution?

Thanks K.

2 Replies

Avatar

Level 10

what is your query ?? can you post here..

Avatar

Level 10

There is an example of getting child nodes here:

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html

See: 

Another thing you can do is include child nodes in the QueryBuilder response. In order to do this you need to specify p.nodedepth=n, where n is the number of levels you want the query to return. Note that, in order for a child node to be returned, it must be specified by the properties selector (p.hits=full). Example:

http://localhost:4502/bin/querybuilder.json?p.hits=full&p.nodedepth=5&property=jcr%3atitle&property....

property=jcr:title
property.value=Triangle
p.hits=full
p.nodedepth=5