Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Sorting by last modified by in AEM assets.html

Avatar

Level 2

Hi All,

I have a requirement where I need to sort the search results in assets.html page as per last modified date. I am attaching a screenshot where we can see that there is no sort order as per date. This is the OOTB result with AEM6.3 SP2. Any help on this would be appreciated. I tried Adobe Experience Manager Customization: AEM 6.2 sort pages in sites admin console this link to sort results for sites.html but it doesn't work

Screen Shot 2018-05-17 at 11.52.41 AM.png

1 Accepted Solution

Avatar

Correct answer by
Level 2

overlay /libs/ dam/gui/content/facets/assets/items under apps and go to /apps/dam/gui/content/facets/assets/items/

create a node nt:unstructured orderby

<orderby

                 jcr:primaryType="nt:unstructured"

                  sling:resourceType="granite/ui/components/coral/foundation/form/hidden"

                  listOrder="17"

                  metaType="hidden"

                  name="orderby"

                  value="@jcr:content/jcr:lastModified"/>

View solution in original post

8 Replies

Avatar

Community Advisor

Hi,

Could you please try to switch on List view and then click on modify date for ascending and descending order sort. if it helps

Screen Shot 2018-05-17 at 11.46.12 PM.png

Thanks

Arun



Arun Patidar

Avatar

Level 2

Actually the requirement is to display the sorted search result in card view.

Avatar

Level 1

Hey there! Were you able to solve this? Thanks!

Avatar

Level 10

List view list you sort by mod date - sometimes its better to use the given functionality in AEM then trying to modify code under /libs. Here is this sorted by mod date:

M77.png

Avatar

Level 1

The requirement is to order in card view, and also the only ones to order are assets, not folders, so... I thought it was an easier modification, but it's taking a lot of time and not sure how to do it yet. Also adding parameters under /libs/dam/gui/content/assets/jcr:content/views/card in the src property /mnt/overlay/dam/gui/content/assets/jcr:content/views/card{.offset,limit}.html{+id}?sortName=modified&sortDir=asc is not applicable because I have to exclude folders from the ordering. Any clues?

Avatar

Correct answer by
Level 2

overlay /libs/ dam/gui/content/facets/assets/items under apps and go to /apps/dam/gui/content/facets/assets/items/

create a node nt:unstructured orderby

<orderby

                 jcr:primaryType="nt:unstructured"

                  sling:resourceType="granite/ui/components/coral/foundation/form/hidden"

                  listOrder="17"

                  metaType="hidden"

                  name="orderby"

                  value="@jcr:content/jcr:lastModified"/>

Avatar

Level 4

Hi all, i need to implement the same thing but i need to sort by Title. I have AEM 6.3.2.0 but i dont have the node "/libs/dam/gui/content/facets/assets/items", could you help me?

Avatar

Level 1

Hi I have the same implementation to be done, i'm working with Version 6.3.3.2 where i have installed 6.3.3.0 service pack and AEM-CFP-6.3.3.2 OOTB sort is not on date. And am not finding the path "/libs/dam/gui/content/facets/assets/items" any help would be helpful.