Expand my Community achievements bar.

Default sort based on Name in ascending order in AEM 6.5.7 +

Avatar

Level 3

5/26/21

Request for Feature Enhancement (RFE) Summary: In 6.5.7 sorting feature is added which by default sort based on created and in ascending order. 
Use-case: We would like the facility to change default setting, instead of default sorting by created, we would like to sort it via Name.
Current/Experienced Behavior: If we go to any card/list/column view it will sort by created.
Improved/Expected Behavior: Some kind of setting to change default sorting, so when we go to any view card/list/column it will sort based on that new default setting i.e. by name.
Environment Details (AEM version/service pack, any other specifics if applicable): 6.5.7 +
Customer-name/Organization name: Hershey's
Screenshot (if applicable):  
Code package (if applicable):  
5 Comments

Avatar

Employee Advisor

6/14/21

Hello @hardik11071994 

Thanks for posting this idea

In the list view, you can sort the list by the value wanted by clicking on the column header

For Assets there is an improvement logged to our engineering team to add the sorting feature in the Card view, internal reference CQ-4289711

 

Could you please let me know if the option of using the list view and sorting using the column header would be a viable solution for you?

Status changed to: Needs Info

Avatar

Level 3

6/14/21

Hi @Cedric_Latimier_ 

Thank you for your response, this idea request logged to create some kind of configuration which will help to set the default sort setting?

 

like if someone wanted to sort card/column view sorting based on modified date by default. do they able to change it from created to modified as default sorting?

 

Thanks

Hardik

Avatar

Employee Advisor

10/19/21

Hi @hardik11071994 

If you want to change the default sort, you could modify the "sortName" param in /libs/dam/gui/content/assets/jcr:content/views/card/datasource to adapt to the default sort you want

For example for default sorting by name, you can change it from

${empty param.sortName ? (empty cookie["cq-assets-files-files-sortName"].value ? "" : cookie["cq-assets-files-files-sortName"].value) : param.sortName}

to

${empty param.sortName ? (empty cookie["cq-assets-files-files-sortName"].value ? "name" : cookie["cq-assets-files-files-sortName"].value) : param.sortName}

Status changed to: Delivered