Programmatically arranging contents in aem 6.4 | Community
Skip to main content
rockie-rocafort
Level 2
Mar 19, 2019 11:00 AM UTC
Solved

Programmatically arranging contents in aem 6.4

Hello everyone. I'm new in working with aem. I'm using aem 6.4. My task is to programmatically sort the order of the contents of a cq:project in aem depending on the content of a json file. The content of the json file should be set as the initial child instead of the children sorted by their creation date.

This is the current structure of my cq:page. If the child2 is the one indicated in the json file, it should be the first one to be displayed. The content of the json file is just the name of one child so even though there are 10 children, the content of the json file should always be the first one in the list.

I've spent hours researching on how I can implement this although I still can't find any solution. Any insights on how should I create this? Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Mar 19, 2019 12:05 PM UTC

Hi,

you can try to order child node using Node API

JCR 2.0: 23 Orderable Child Nodes (Content Repository for Java Technology API v2.0)

Arun Patidar

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Mar 19, 2019 12:05 PM UTC

Hi,

you can try to order child node using Node API

JCR 2.0: 23 Orderable Child Nodes (Content Repository for Java Technology API v2.0)

Translate
Arun Patidar
smacdonald2008
Level 10
Mar 19, 2019 11:17 AM UTC

Typically Pages are ordered under content based on how the site is setup in site admin. You can work with pages via the PageManager API - PageManager ("The Adobe AEM Quickstart and Web Application.")

Translate