Programmatically arranging contents in aem 6.4

Avatar

Avatar

rockie-rocafort

Avatar

rockie-rocafort

rockie-rocafort

19-03-2019

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.

1714724_pastedImage_0.png

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!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

19-03-2019

Answers (1)

Answers (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

19-03-2019

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