I have a component which extends from List component. Currently we only have option to Order By title or Last Modified date but we want the list to be Order by published or lastReplicated date. What will be best approach to do this? I was thinking to pull the list in component.js file and create a method to sort the list but wanted to see if AEM offer an easier solution to solve this issue and if any see issue with this solution.
Solved! Go to Solution.
Hi @snowwhite92 ,
If your custom component have sling model/services implemented you may add the logic in existing services which will be responsible to fetch published or lastReplicated date.
The best approach I can consider is to delegate "com.adobe.cq.wcm.core.components.models.List" and have business logic to it.
Hope that helps!