• Not Answered

Get top 3 records in Sitecore SXA query

Hi,

I am using Sitecore Experience Accelorator. I have a requirement where on one specific page I need to show all records of node in two section. On one section, I need to show top 3 records based on Publish Date field. In second section, I need to show rest all records. Can anyone suggest me what query I need to write. I tried a lot but unable to find top number query in Sitecore.

 

Thanks,

Ravi Sharma

1 Reply

  • Hello Ravi,

    If you're using SXA it would depend on what you use to achieve this.
    If you're using a Page List, you could set:
    * for section one: the "Page size" in the control properties to 3.
    * for section two: the "Offset" to 3

    This way you have the same list only 1 will show the top 3, the other will show all others starting for the configured offset.

    Kind regards,
    Danny Paul van Iersel