Saturday, August 13, 2016

AEM 6.2 sort pages in sites admin console

Disclaimer : Ideas/Implementions provided in this blog express my personal view. Adobe or Me will not be held responsible for damage caused on your system because of information. Please don't try any suggestion in production system without proper testing. This is not an Adobe supported blog


AEM 6.2 sites console provides support for sorting but we need to customize the sort parameter so that the sites console displays the sorted pages.

Objective:

Sort pages in sites admin console by last modified date, with latest being on the top of the list, in all the views (card, list and column)

PackageVideo

The sorted list looks like :


Follow the below steps:


  1. go to /libs/wcm/core/content/sites/jcr:content/views/column/datasource in crx/de
  2. Right click on the 'datasource' node and click on the "Overlay Node" and in the modal shown, check the 'Match Node Types' checkbox  and click on 'OK'
  3. This will overlay this node in "/apps/wcm/core/content/sites/jcr:content/views/column/datasource". Go to "/apps/wcm/core/content/sites/jcr:content/views/column/datasource" in crx/de
  4. add the following two properties on that node
         sortName = modified (Type is String)
         sortDir = asc (Type is String)
   5. save the changes.
   6. Now we've added the configuration for sorting on last modified for column view. 
   7. Similarly, overlay "/libs/wcm/core/content/sites/jcr:content/views/card/datasource" and           
      "/libs/wcm/core/content/sites/jcr:content/views/list/datasource" and add the above two 
       properties in the overlaid location.
       
Configurations:
  • valid values for sortDir
    • asc - to sort in ascending order
    • desc - to sort in descending order
  • valid values for sortName
    • modified - to sort on the page last modified date
    • main - to sort on the title of the page
    • published - to sort on the page published date


8 comments:

  1. Hi RAvi,
    I tried exactly same on AEM6.2 SP1 installation and its not working. Do you we need to anything more to work in AEM6.2 SP1

    ReplyDelete
  2. What is the path of DAM Assets content equivalent to /apps/wcm/core/content/sites/jcr:content/views/column/datasource.
    This path is working only for sites pages.

    ReplyDelete
  3. @kavitha,
    AEM DAM doesn't have support for server side sorting in 6.2

    ReplyDelete
    Replies
    1. for 6.3 does it work seems its server side sorting ?

      Delete
  4. Thanks for shearing the Information with us. For more details visit our website.
    Uipath Training Institute In Ameerpet

    ReplyDelete
  5. Hi,

    Could you please tell if the same package is compatible for AEM 6.3 as well?

    I've tried the package and it works fine for modified and published property but when I try main to sort based on title, then it doesn't work.

    Could you please tell me if there's other property that needs to be used to sort pages based on title?

    Thanks,

    ReplyDelete
  6. Hi Ravi,

    Do you know if that datasource can be applied to any content folder to pick up a preference of sorting, same as main site page ? If so how do you overlay/setup the datasource on the folder you want to set sorting for?

    ReplyDelete
  7. I am trying to apply this sorting to the projects in projects.html in AEM 6.5 for all three views (Cards,list and calender)it is not applying there.

    Can you please suggest me what can be the possible solution for this?

    ReplyDelete