AEM 6.3 -> SSort assets in alphabatical order in assets.html for coloumn view (if possible all views) | Community
Skip to main content
Level 2
Jul 17, 2019 9:39 PM UTC
Solved

AEM 6.3 -> SSort assets in alphabatical order in assets.html for coloumn view (if possible all views)

I have a requirement to sort the assets folders/assets in alphabetical order

eg: /content/dam/a (a folder)

      /content/dam/b

     /content/dam/c

also /content/dam/a/a.jpg

        /content/dam/a/b.jpg    

    /content/dam/a/c.jpg

Tried the following:

1) overriding  /libs/wcm/core/content/sites/jcr:content/views/column/datasource and adding properties

sortName = modified (Type is String)

sortDir = asc (Type is String)

2) creating sling:oderableFolder
But the same affect.

Appreciate the help. Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
anubhas68994354Accepted solution
Employee
Jul 18, 2019 2:02 AM UTC

Hi Sunil,

Can you try to overlay columns [1] to switch 'sortable' to 'true' and make columns sortable in List view. In your case if you need to sort by name - update sortable property to true for [2] node.

[1]

/libs/dam/gui/content/commons/availablecolumns

[2]

/libs/dam/gui/content/commons/availablecolumns/name

10 replies

arunpatidar
New Participant
Jul 22, 2019 11:53 PM UTC

Hi,

I think OOTB there is no way to do sorting for assets for column view like sites.

Translate
Arun Patidar
Employee
Jul 22, 2019 5:25 AM UTC

Hi Sunil,

As per me sorting works only for List view. The fix given by me is only for List view.

Translate
arunpatidar
New Participant
Jul 20, 2019 11:55 AM UTC

Hi Sunil,

I did not try this I just point out you to assets datatsource instead of site datasource, I'll check and come back to you

Translate
Arun Patidar
vijkumar
Employee
Jul 19, 2019 8:36 PM UTC

Hi Sunil,

Per my understanding sorting only works for List view as of now. The column and card views are not sortable.

Overriding above paths and adding those properties will only impact list view.

Translate
Level 2
Jul 19, 2019 7:36 PM UTC

Thank you @Arun Patidar,

did it work for you? I tried it still the same result dnt see ascending order. Please let me know if I am missing something. Currently I am on 6.3 Sp2.

Translate
Level 2
Jul 19, 2019 7:34 PM UTC

Thank you anubhas68994354

I am able to sort on list view- as well  they want it like default (to avoid user/author action to sort). Aswell column view is the one the    authors use the most here.

Translate
arunpatidar
New Participant
Jul 18, 2019 12:41 PM UTC

Can you overlay

/libs/dam/gui/content/assets/jcr:content/views/column/datasource

and add below properties to overlaid node

/apps/dam/gui/content/assets/jcr:content/views/column/datasource

sortName = name (Type is String)

sortDir = asc (Type is String)

Translate
Arun Patidar
anubhas68994354Accepted solution
Employee
Jul 18, 2019 2:02 AM UTC

Hi Sunil,

Can you try to overlay columns [1] to switch 'sortable' to 'true' and make columns sortable in List view. In your case if you need to sort by name - update sortable property to true for [2] node.

[1]

/libs/dam/gui/content/commons/availablecolumns

[2]

/libs/dam/gui/content/commons/availablecolumns/name

Translate
Level 2
Jul 18, 2019 12:08 AM UTC

Hi I checked this page, tried the same and I don’t see  it works. Wondering something to do with assets?

Translate
arunpatidar
New Participant
Jul 17, 2019 11:58 PM UTC