provide list of pages with their assosciated tag | Community
Skip to main content
Level 6
November 6, 2023
Solved

provide list of pages with their assosciated tag

  • November 6, 2023
  • 1 reply
  • 681 views

Hi All,

I want to get a list of pages and their tags under "/content/masters" whose tag value is atlas-copco:industrial-tools/expert-hub/industries/industrial_assembly

for example:

page path  : /content/masters/en                            

cq:tag: atlas-copco:industrial-tools/expert-                                    hub/industries/industrial_assembly, atlas-copco:industrial-tools/webinars

 

I have used this query

SELECT * FROM [cq:PageContent] AS page
WHERE ISDESCENDANTNODE([/content/masters])
AND page.[cq:tags] = 'atlas-copco:industrial-tools/expert-hub/industries/industrial_assembly'

It just gives result with page path.

 

Can anyone provide the query.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mahedi_Sabuj

If I have understood your requirement correctly, you can use the query builder to obtain paths and their associated tags as shown below. 

path = /content/masters/en type = cq:Page tagid = atlas-copco:industrial-tools/expert-hub/industries/industrial_assembly tagid.property = jcr:content/cq:tags p.hits = selective p.properties = jcr:path jcr:content/cq:tags p.limit = -1

 

 

1 reply

Mahedi_Sabuj
Community Advisor
Mahedi_SabujCommunity AdvisorAccepted solution
Community Advisor
November 6, 2023

If I have understood your requirement correctly, you can use the query builder to obtain paths and their associated tags as shown below. 

path = /content/masters/en type = cq:Page tagid = atlas-copco:industrial-tools/expert-hub/industries/industrial_assembly tagid.property = jcr:content/cq:tags p.hits = selective p.properties = jcr:path jcr:content/cq:tags p.limit = -1

 

 

Mahedi Sabuj
Vani1012Author
Level 6
November 6, 2023

@mahedi_sabuj I ran the query but the tag associated to it isn't displaying only page path is showing
For air-motors page it has 4 tags I want to get those tags as well with page path

 

Please refer screenshot How I want

 

 

Mahedi_Sabuj
Community Advisor
Community Advisor
November 6, 2023

Hi @vani1012,

Navigate to the lower-left section and locate the "JSON QueryBuilder Link". Click on this link to access a list of page paths along with their associated tags.

Mahedi Sabuj