Hi,
I would like to select dates to sort my articles but I see only this :
Please share you domain name again and also let me know when Strapi is live so I can add sort by date.
Try now. Also I have to go, but will back on approx 4h, so I will check your response later.
@dejan It works like a charm for most of my usecases.
However, I would love to define the sort for iterables.
Example: in the article category, I’m displaying all articles using an iterable to navigate the relationship. I would love to get articles sorted with most recent article first and probably latest 10 articles only
and to go even further, even if I don’t have this need for now, but filtering/pagination would be wonderful
Not sure about this one, it’s bit limited for sources on page. You can call another source inside page to get list of what you need with proper sorting for now.
Humm I see. However, it means getting another call for data which is already in the data structure.
If I understand correctly, it is a better approach to have several sources defined than only one with a a big data structure in response. It could potentially have a better response time.
Correct?
You can have up to 10 source calls per single page. So there’s nothing wrong if you have sources on single page.
But there are few things you might want to avoid:
-
Nested sources (source in source. Meaning if first source returns 20 items, then 21 total sources will be executed, and the limit is 10, so the loading of rest sources will slow down (won’t effect website load time, just that source part)
-
Having more than 10 sources. First 10 sources will load instantly, the rest will be delayed, as there is limit of 10req/s on API for sources.
Other than that, feel free to have up to 10 sources without worrying anything, sources does not slow down your website, since they are executed once entire page shows (except single pages).
So in my opinion, we should keep the source on pages (single pages) as minimum as possible, and then use tag sources to show other data.
But, nonetheless I would like that we add option for single sources (on page) to have also options like sorting, or depending what source has from options.