AEM Package Filter | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
Aug 23, 2022 6:49 AM UTC

In case you are using ACS Commons, you can achieve it by using Query Packager.

SQL2 Query for same would be 

SELECT * FROM [cq:Page] AS page WHERE ISDESCENDANTNODE(page, "/content/we-retail/us/en/products") AND name() like "%shorts%"

Link : https://adobe-consulting-services.github.io/acs-aem-commons/features/packagers/query-packager/index.html

 

5 replies

Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
Aug 23, 2022 6:49 AM UTC

In case you are using ACS Commons, you can achieve it by using Query Packager.

SQL2 Query for same would be 

SELECT * FROM [cq:Page] AS page WHERE ISDESCENDANTNODE(page, "/content/we-retail/us/en/products") AND name() like "%shorts%"

Link : https://adobe-consulting-services.github.io/acs-aem-commons/features/packagers/query-packager/index.html

 

Translate
ChaoXiong
ChaoXiongAuthor
Level 2
Aug 23, 2022 7:11 AM UTC

Thank you very much @sachin_arora_, that's great!😊

Translate
ChaoXiong
ChaoXiongAuthor
Level 2
Aug 23, 2022 4:07 AM UTC

I'm trying to write like this. Although I can get all the pages ending in "-shorts", I don't want to include these extra pages in the picture.

Translate
Manu_Mathew_
New Participant
Aug 23, 2022 3:52 AM UTC

@chaoxiong You can use the "Add rule" and choose "inlcude" from the dropdown and add your filter-

for eg. something like this:

Hope this helps.

 

 

 

Translate
ChaoXiong
ChaoXiongAuthor
Level 2
Aug 23, 2022 3:59 AM UTC

thanks, @manu_mathew_ 

I mean, when you don't know the specific directory, you only see the directory level and how to get all the pages ending in "-shorts". You can only get the pages under "men/shorts" by writing like this.

Translate