Is it possible to get 5 latest posts automatically in a field?

I’m trying to create a simple blog and I’m looking for a way to create a component that always has 5 latest posts in it. Basically I’d need a multi-options -like field that would populate 5 latest articles in it automatically.

Is this possible via the schema definition / some other way or do I need to manually make the query to content delivery API to achieve this?

Hello @jyrki,

you can use the delivery API to make this possible on your webpage by using starts_with and reducing the count of stories that you’re getting with a request by using the per_page and setting the limit to 5. You will also need to decide by which date field you want to sort your stories like in the following example:
https://api.storyblok.com/v1/cdn/stories/?version=draft&token=judpsMh54eY3u3CvjkPWCAtt&cv=1619435691&starts_with=properties/&per_page=5&page=1&sort_by=created_at:desc

Best regards
Hannes