내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

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

Avatar

Level 2

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

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee

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

1793776_pastedImage_13.png

원본 게시물의 솔루션 보기

10 답변 개

Avatar

Community Advisor

Avatar

Level 2

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

Avatar

정확한 답변 작성자:
Employee

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

1793776_pastedImage_13.png

Avatar

Community Advisor

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)

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

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.

Avatar

Level 2

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.

Avatar

Level 3

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.

Avatar

Community Advisor

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

Arun Patidar

AEM LinksLinkedIn

Avatar

Employee

Hi Sunil,

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

Avatar

Community Advisor

Hi,

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

Arun Patidar

AEM LinksLinkedIn