Expand my Community achievements bar.

SOLVED

AEM Debugger Retrieve page path

Avatar

Level 3

I want to get those pages whose tag property is authored in dialog is same as the page properties of the pages.

 

For ex id we author a tag tag1, tag2 and the pages already having those tags in there page properties should appear

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @rohankalra , 
Your requirement if i understood right, what ever you tag in component's dialog it should return all the pages that has the tag authored in dialog. you can use query-builder for this and return the list of pages in sling model.

 

 

path=/content/<my-project>
type=cq:Page
1_property=jcr:content/<pageProperty>
1_property.value=<tag_added_in_dialog>

 

 

 

If your requirement is to get pages based on tags, you can also use existing list OOTB component for the same, it has build list using tags option which suits this scenario

krishna_sai_0-1677060756548.png

 

 

Hope this helps,
Krishna

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @rohankalra , 
Your requirement if i understood right, what ever you tag in component's dialog it should return all the pages that has the tag authored in dialog. you can use query-builder for this and return the list of pages in sling model.

 

 

path=/content/<my-project>
type=cq:Page
1_property=jcr:content/<pageProperty>
1_property.value=<tag_added_in_dialog>

 

 

 

If your requirement is to get pages based on tags, you can also use existing list OOTB component for the same, it has build list using tags option which suits this scenario

krishna_sai_0-1677060756548.png

 

 

Hope this helps,
Krishna