Sort page in alphabatical order in sites.html (AEM 6.3) | Community
Skip to main content
Himanshu_Singhal
New Participant
Oct 22, 2018 4:40 PM UTC
Solved

Sort page in alphabatical order in sites.html (AEM 6.3)

Hi,

I'm using AEM 6.3 and want to sort pages in sites.html in alphabetical order. I want to sort the pages in alphabatical based on page title.

I've followed the steps mentioned in blog Adobe Experience Manager Customization: AEM 6.2 sort pages in sites admin console and I'm able to sort the pages based on last modified and last published but not able to sort then based on title.

Any idea?

Regards,
Himanshu

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
Oct 22, 2018 6:32 PM UTC

HI,

It works in 6.3

Output - Ascending order z-a and Z-A

datasource changes

datasource code(already present)

Arun Patidar

9 replies

smacdonald2008
Level 10
Oct 23, 2018 1:34 PM UTC

In AEM 6.3 - its recommended to use TOuch UI.

Translate
Himanshu_Singhal
New Participant
Oct 23, 2018 1:28 PM UTC

Thanks Arun for providing detailed explanation :-)

I've 1 more question here about how it can be achieved in Classic UI?

Regards,

Himanshu

Translate
arunpatidar
New Participant
Oct 23, 2018 6:17 AM UTC

Hi,

The sorting is based on java.util.Comparator

which compare string(type) character by character based on ASCII and returns integer based on comparison result.

So sorting order is correct in above screenshot.

You can find complete code at:

/libs/cq/gui/components/common/wcm/datasources/childpages/childpages.jsp

Translate
Arun Patidar
Himanshu_Singhal
New Participant
Oct 23, 2018 3:29 AM UTC

Thanks Arun for the detailed explanation.

But, I think either I failed to explain properly or I'm missing something here.

The pages order which you've shown in screenshot (ascending z-a, Z-A)

togglePage -> myProj63 -> myHTL63 -> demo2 -> demo-wr -> common -> ?? --> ??

The WE.Train & WE.Retail, shouldn't it come at the top?

Also, could you please share the files path where I can find the code you've attached?

Translate
smacdonald2008
Level 10
Oct 22, 2018 9:44 PM UTC

Thanks Arun for posting this detailed information

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Oct 22, 2018 6:32 PM UTC

HI,

It works in 6.3

Output - Ascending order z-a and Z-A

datasource changes

datasource code(already present)

Translate
Arun Patidar
Himanshu_Singhal
New Participant
Oct 22, 2018 5:54 PM UTC

Hi,

The sorting of pages based on title shall appear based on page load.

The package which is shared in blog, it contains overlay of all 3 views (list, column and card). And, if I used the property value as "published" then it shows the pages as per last modified status in ascending or descending order.

I want the same in case of title as well.

Translate
arunpatidar
New Participant
Oct 22, 2018 5:40 PM UTC

Hi,

I think sorting by title is OOTB.

I am able to do it in 6.3

Translate
Arun Patidar
New Participant
Jul 6, 2022 5:18 AM UTC

Hi Arun,

This query might not be exactly related to this but I am facing a similar issue with respect to OOTB sorting with Commerce products if there are more items on the page.
However, sorting works if there are just 8-10 items. Any suggestions on this?


Regards,

Nitesh

Translate