How to gather the latest data regardless its section
This is an open discussion with 3 replies, filed under XSLT.
Search
There are probably 4 or 5 ways to do this. One way is to create a DS for each section that returns the latest five entries, and then sort them all in your XSLT and display the top five. That’s a little messy.
Another way would be to install the Tracker extension, and use a slightly tweaked version of the Data Source it provides to fetch the 5 most recently-created entries sitewide. The DS returns basic info about the entries (id, primary field, etc), but it also outputs their IDs as a param, so you could use chaining to fetch the full entry data if you need it. There are details in the README for creating a custom version of its DS. It’s fairly easy.
Finally, if you’ve got good enough PHP chops, you could always just whip up a custom Data Source yourself to fetch exactly what you need.
EDIT: This thread made me realize that Tracker’s DS could be tweaked to make chaining a little more efficient. See here for details.
I am placing my bet on the Tracker extension, let’s see how i go from that… as soon as i get any extension working, i was trying the ckeditor and the localization-manager but i just can’t enable them (they won’t show up on my extensions view on the admin interface).
Thanks a lot for your sugestions.
Best regards,
D.H. Bahr
Already got the Tracker up and running: i’ll be trying that out soon.
Create an account or sign in to comment.
Hullo everyone!
I am new to Symphony and I am working on a site managing several content types, yet I would like my home page to show the latest (lets say 5) entries from some sections no matter if there are all from the same section or from all of them, but only a limited number.
How could that be done?
Best regards,
D.H. Bahr