Page.listChildren() or data-sly-list=currentPage.listChildren to return sorted list

Avatar

Avatar

mohani57395378

Avatar

mohani57395378

mohani57395378

27-08-2019

Hi All,

I am recursively listing out all the sub pages from a path using data-sly-list=currentPage.listChildren. But its returning the list as per node structure, is there anyway we can pass some parameters to get a sorted list based on title or published date.

View Entire Topic

Avatar

Avatar

mohani57395378

Avatar

mohani57395378

mohani57395378

28-08-2019

Hi Nirmala,

Thanks for your reply.

I have tried to do the same using currentPage.listChildren but i don't see any  methods which will give a sorted list based on some attributes(replication date, title) just like Filters(which will return specific pages).

use(function () {
     return { pageList : currentPage.listChildren }
});