Highlighted

6.3 Assets ListView Auto Sort by Type

bobbym47196936

22-11-2019

Hi Everyone,

I'm try to find some information regarding what is necessary to modify in order to have ListView for Assets in Touch UI being sorted by Type field by default, so when user opens assets are automatically sorted this way. The reason we need this is because users would like to see sub folder on top of the list instead of the latest assets.

Screen Shot 2019-11-22 at 3.16.49 PM.png

In our use case this would do the job since the two types of assets we basically

have in our folder are Folder and Image.

Please let me know if there's any setting I could use or if I need to overlay one of the jsp files for example.

Thank you very much!

Bobby

Replies

Highlighted

jbrar

Employee

23-11-2019

[1] is the node to make the Name column sortable. To make the sorting case insensitive, try using 'sortMode' as 'local' at [2] which is set as 'remote' by default. Refer [3] for more details

[1] /libs/dam/gui/content/commons/availablecolumns/name

[2] /libs/dam/gui/content/assets/jcr:content/views/list

[3] Table — Granite UI 1.0 documentation

Highlighted

bobbym47196936

25-11-2019

Hi jbar,

Thank you for reply. I actually need to sort items by Type rather than name. However I noticed that regardless of the selected view if in the parameters you add the following to the url: "?sortName=type&sortDir=asc", like http://localhost:4502/assets.html/content/dam?sortName=type&sortDir=asc it gets the results we need. My question now is how to make those parameters always be present by default on any folder resolved by assets.html, so items are always sorted the way we want. I tried modifying the pageUrlTemplate of /libs/dam/gui/content/assets/jcr:content but no success so far.

I'm I on the right track?

Thanks a lot!