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

SOLVED

AEM Package Filter

Avatar

Level 2

I want to package page packets ending in "-shorts". How do I write a filter?

I tried the following method, but it didn't work.

 

ChaoXiong_1-1661224402184.png

1 Accepted Solution

Avatar

Correct answer by
Level 9

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....

 

View solution in original post

5 Replies

Avatar

Level 8

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

for eg. something like this:

ManuMathew1994_0-1661226642212.png

Hope this helps.

 

 

 

Avatar

Level 2

thanks, @ManuMathew1994 

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.

Avatar

Level 2

ChaoXiong_1-1661227451010.png

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.

Avatar

Correct answer by
Level 9

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....