Customize the "list" component
Can we customize the "List" component to add the "cq:lastReplicated" in the orderby dropdown. Tried by adding "cq:lastReplicated" in the dropdown value, but its not sorting. Can u please help.
Can we customize the "List" component to add the "cq:lastReplicated" in the orderby dropdown. Tried by adding "cq:lastReplicated" in the dropdown value, but its not sorting. Can u please help.
The sorting of the list component is implemented by using Java Collections.sort() together with custom Comparators. To change the sorting order, you could do a similar implementation and could control the sorting orders by using different custom Comparators. API details at [1]. The steps are
* Create a custom Comparator<Page>
* In the list component set setOrderComparator with your custom one.
The alternative another option is use advanced search feature of list and have query predictor to return as per your need.
[1] http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/foundation/List.html
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.