Combining external data with a Symphony Section
This is an open discussion with 2 replies, filed under General.
Search
A customised Dynamic XML datasource is your best bet. So long as you add the parameter to the parameter pool using the usual naming convention ($ds-handle.param
), when you use this parameter in your other datasource the dependencies should resolve automatically.
Thanks for the response - I'll try that first.
I've just been reading about Providers and think that extracting the code into its own extension could be worthwhile. I could add pagination and sorting options to the admin screen instead of relying on URL parameters. And others might find a Datasource that pulls in Libsyn download stats useful. Would output parameters/dependencies work the same way in this scenario?
Create an account or sign in to comment.
I'm using Symphony for a podcast website. Episode info is stored in Symphony and the media files are stored with a third party hosting service. This service provides download statistics and I would like to use these to display the Top N downloaded episodes (for the current month and of all time) on the site. I need some kind of Datasource for the downloads data but I'm not sure how best to set it up.
Things a downloads Datasource would need:
Approaches I have considered:
A customised Dynamic XML Datasource. It has caching for free and I could use URL parameters for pagination and sorting. Presumably I could add whatever output parameters I needed to the param pool but would the dependencies work? Is it possible to force an XML DS to run before a Section DS?
A customised Section Data Source. Has output parameters, sorting and pagination built in - potential for leveraging the existing Symphony codebase. Integration could be quite complex though and I would need a dummy Symphony Section. Also lacks caching (e.g. would need to use the Cacheable DS extension or similar).
Other ideas:
Forget Datasource chaining. Instead write a custom Datasource that queries the third party service and Symphony, combines the data internally and returns the result. Technically simpler but a lot less flexible.
Forget custom Datasources. Instead use a custom event to populate a Symphony Section with the downloads data. This Section could then be queried/chained in the normal way.
Any comments on the best approach? None of these are particularly elegant solutions. Maybe I'm missing something obvious.