Monday, 13 November 2017

Sitecore Experience Accelerator :: SXA :: Using Page list Component to Display :: Articles Sorted by Custom Date ::

Let's assume that we have a requirement to build the news component which is similar to shown below.




Basic Business Case was to get the news article sorted by their publishing date.

Alright, let's start some action.


  1. All the news items are stored under /sitecore/content/TEN/WEBSITE/Home/news
  2. Create an item query  /sitecore/content/TEN/WEBSITE/Settings/Item Queries/NewsSortedByDate as shown below
I have used build query mechanism 

template:{Your Template Id};sort:news-published-date





Cool now in Page List Component use the item query in order to list the data as shown below.



The index should be updated in order to have relevant and correct data. Default rendering list the data in list view.

We can use rendering variant in order to customize the look and feel as per business need.

Happy Sitecore SXA.







No comments:

Post a Comment

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...