Expand my Community achievements bar.

Display pages link with page metadata

Avatar

Level 4
Level 4

Hello community members, 

I am wondering if anyone knows of an OOB option that allows me to display a list of avaialble pages (link) within a specified path(/content/wknd) along with showing the "created by" , "created date" and "lastmodiffiedBy" metadata information. 

Do you have any suggestion about how to achive this or any recommendation requires minimum code change. 

 

Thanks

7 Replies

Avatar

Community Advisor

@nj2 You can use the list core component but i dont think it prints the pages along with its related metadata.

You can either extend this component or if the use case is very specific, create a component that lets you iterate over a children pages given a root page path and additionally you can get and return the metadata of the child pages in your HTL.

https://www.aemcomponents.dev/content/core-components-examples/library/core-content/list.html

 

 

Avatar

Level 4
Level 4

Thanks Harwinder, as you already mentioned it requires customization, trying to explore OOB option before going for any customization. 

Avatar

Community Advisor

You can make use of the Query Builder to retrieve page metadata. If you intend to display it within a component, you'll need to obtain the data using the QueryBuilder API within a Sling Model and then display it in HTL by iterating through the retrieved data.

path = /content/wknd
type = cq:Page
p.hits = selective
p.properties = jcr:path jcr:content/jcr:title jcr:content/jcr:createdBy jcr:content/jcr:created jcr:content/cq:lastModified jcr:content/cq:lastModifiedBy

 

Avatar

Level 4
Level 4

Thanks a bunch! I'm actually on the hunt for some OOB suggestions/solutions rather than custom solutions. Still, I really appreciate your help!

Avatar

Level 4
Level 4

Thanks Shashi, I need this information in rendered HTML and not at the author level. In the Author environment, I believe you can obtain the same information using reports as well. 

Avatar

Administrator

@nj2 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni