Search

I would like to create an RSS aggregator that loads multiple RSS feeds on one page (similar to Netvibes.com or iGoogle). The RSS feed sources are stored in appropriate section entries.

How can I load the Data Source with Dynamic XML data from multiple sources in one page? Or is there any way how to call multiple Dynamic XML Data Source instances per one page with various input parameters? Or am I just thinking wrong way?

Aha, this has been asked before and at present I don’t think it is possible. While you can pass parameters into the URL of a Dynamic XML feed (e.g {$root}) you can’t say “get XML for each item in X” which is what you want to do. You may find that you need to write an intermediary PHP script to do the feed grabbing. If you set the text field that holds the RSS source to be the Output Parameter for your data source you should be able to pass these to your own script:

{$root}/feed_fetcher.php?feeds={$ds-rss-feeds}

Where the above is the URL of the Dynamic XML Data Source, and {$ds-rss-feeds} is the Output Parameter from a DS named “RSS Feeds”.

I haven’t tested the above, but in principle I would expect it to produce something like:

http://mysite.com/feed_fetcher.php?feeds=http://domain1.com/rss,http://domain2.com/rss,http://domain3.com/rss

Where the three RSS URLs are from three entries in your section.

Or am I just thinking wrong way?

You’re thinking the right way… it’s just Symphony can’t quite do you you need it to ;-)

Aha, this has been asked before

Found it! Twitter data source with dynamic username

It’s also possible to let the XSLT processor load external URLs using the document() function (see Currency Converter as an example).

I just don’t know how this will behave if you’re calling document() in a loop.

I think Phoque has your simplest answer. Just be aware that the document() request timeout will probably be beyond you immediate control, and there will be no caching of those requests. I can’t recall offhand what happens when a document() request times out, but I wouldn’t be surprised if it chokes the transformation.

…but I wouldn’t be surprised if it chokes the transformation.

This depends on the XSLT processor, but as far as LibXSLT is concerned (What Symphony uses); it’ll throw an XSLT error if the request times out or if the path is incorrect.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details