Articles on: Modules

FAQ - How do we display the most recent Module Item?


To get the most recently "released" item, you can use the sort_type parameter to sort by properties.release_date. You can alternatively use created_at to sort by the Item you most recently added to the Admin.

{%- include 'module', id: '3', layout: 'default', per_page: 1, sort_type: 'properties.release_date', sort_order: 'asc' -%}

Then just output one post- to get the first Item. To do this, set per_page to 1.

Use the sort_order to control whether you get the first or last item. To get the latest Item by date, the date will have a higher value, so use 'desc' (starts with highest number) rather then 'asc' .

Updated on: 18/10/2021

Was this article helpful?

Share your feedback


Thank you!