내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Crx/de query

Avatar

Level 2

Hello,

is there a way to create a query (SQL, SQL2 or Xpath) in order to show the path and one property of the node in crx/de ?

like

select jcr:title  from nt:base

where jcr:path LIKE '/content/.....'

and show in crx/de 2 columns Path and jcr:title.

Thank you so much.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

You can achieve this by Query debugger Tool as suggested by Scott
http://localhost:4502/libs/cq/search/content/querydebug.html

Query

type=nt:base

path:/content/AEM63App/en

property:jcr:title

property.operation : exists

p.hits=selective

p.nodedepth

p.properties=jcr:path jcr:title

p.limit : 21

you can modify above query based on your search criteria.

when you execute this you will be getting an option to get Json query via JSON QueryBuilder Link, when you hit this link you'll get the results like below:

{

   "success":true,

   "results":21,

   "total":21,

   "more":false,

   "offset":0,

   "hits":[

      {

         "jcr:path":"/content/AEM63App/en/travel/jcr:content",

         "jcr:title":"Travel"

      },

      {

         "jcr:path":"/content/AEM63App/en/community/jcr:content",

         "jcr:title":"Our Community"

      },

...

]

you can parse this Json and use wherever you want.

hope this will help.

Thanks

Arun

Arun Patidar

AEM LinksLinkedIn

원본 게시물의 솔루션 보기

7 답변 개

Avatar

Level 3

Hi,

The best practice is to write jcr-sql queries and execute it.

So instead of generating, write jcr-sql query and you can always check the output by clicking on execute instead of generate.

Follow to below link to learn jcr query:

Chapter 10. Querying and Searching using JCR

Thanks,

Shridhar Sahu

Avatar

Level 2

jcr-sql queries and execute direclty in crx/de ?

Avatar

Level 3

yes directly from crxde -> tools -> query

write query and then execute

query.PNG

Avatar

Level 2

Done, it shows only the path

1479621_pastedImage_0.png

Avatar

Level 10

Avatar

정확한 답변 작성자:
Community Advisor

You can achieve this by Query debugger Tool as suggested by Scott
http://localhost:4502/libs/cq/search/content/querydebug.html

Query

type=nt:base

path:/content/AEM63App/en

property:jcr:title

property.operation : exists

p.hits=selective

p.nodedepth

p.properties=jcr:path jcr:title

p.limit : 21

you can modify above query based on your search criteria.

when you execute this you will be getting an option to get Json query via JSON QueryBuilder Link, when you hit this link you'll get the results like below:

{

   "success":true,

   "results":21,

   "total":21,

   "more":false,

   "offset":0,

   "hits":[

      {

         "jcr:path":"/content/AEM63App/en/travel/jcr:content",

         "jcr:title":"Travel"

      },

      {

         "jcr:path":"/content/AEM63App/en/community/jcr:content",

         "jcr:title":"Our Community"

      },

...

]

you can parse this Json and use wherever you want.

hope this will help.

Thanks

Arun

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

Thank you so much