we need to sort pages alphabetically on for specific folders. I tried to overlay the OOTB path /libs/wcm/core/content/sites/jcr:content/views/column/datasource to /apps but it doesnt seem to work because the sling:resoureType of libs folder path is cq/gui/components/common/wcm/datasources/childpages and i couldnt find this path in my aem.
I tried to add jsp code here : /apps/cq/gui/components/coral/admin/page/columnitem/columnitem.jsp. we have used this jsp to manipulate the page names and title. But for this requirement this also doesnt seem to work.
can someone help me with this ?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi Sushma,
Sorting pages alphabetically in AEM, particularly for specific folders, involves understanding and potentially extending the functionality of the existing datasource and views. Based on your problem statement, there are a few key points and approaches you can consider:
Key Observations and Challenges:
-----------------------------------------------------
i) cq/gui/components/common/wcm/datasources/childpages:
The sling:resourceType you mentioned points to an out-of-the-box (OOTB) datasource used for fetching child pages. If you cannot locate this path, it could be because the Sling model or the datasource is either not extended or not exposed directly in your instance. It might also be included in a bundle or service rather than as a visible node in CRX.
ii) JSP Customization (/apps/cq/gui/components/coral/admin/page/columnitem/columnitem.jsp):
While you can manipulate titles and page names with this JSP, it does not directly control the sorting of pages in the datasource. Sorting needs to happen at the datasource or query level, not in the rendering layer.
--> Customize the Datasource
query.setSortOrder("jcr:title", QueryBuilder.DESCENDING);
Regards,
Manvi Sharma
Hi @SushmaNa1 you can try overlaying /libs/granite/ui/components/coral/foundation/columnview
Here you can get OOTB datasource, iterate and sort
Here you can write Condition if currentresource.getpath() is your Condition folder or not
Hi Sushma,
Sorting pages alphabetically in AEM, particularly for specific folders, involves understanding and potentially extending the functionality of the existing datasource and views. Based on your problem statement, there are a few key points and approaches you can consider:
Key Observations and Challenges:
-----------------------------------------------------
i) cq/gui/components/common/wcm/datasources/childpages:
The sling:resourceType you mentioned points to an out-of-the-box (OOTB) datasource used for fetching child pages. If you cannot locate this path, it could be because the Sling model or the datasource is either not extended or not exposed directly in your instance. It might also be included in a bundle or service rather than as a visible node in CRX.
ii) JSP Customization (/apps/cq/gui/components/coral/admin/page/columnitem/columnitem.jsp):
While you can manipulate titles and page names with this JSP, it does not directly control the sorting of pages in the datasource. Sorting needs to happen at the datasource or query level, not in the rendering layer.
--> Customize the Datasource
query.setSortOrder("jcr:title", QueryBuilder.DESCENDING);
Regards,
Manvi Sharma