1832 Posts in 984 Topics by 553 members
|Go to End|
6 October 2009 at 2:44am
I've got a Newsroom which has several content types, i.e.: Press Releases, the Blog, Events, etc. I'd like to offer an RSS feed on this parent level, but I noticed that the RSS Feed class constructor only takes $this->Children as a parameter. I'd like it to build the XML going another level down if possible. I tried passing in:
$rss = new RSSFeed($this->Children()->Children, $this->Link(), "Newsroom");
But alas it does not appear that Children() can be called recursively. Can anyone suggest a way to do this?
Thanks in advance,
13 October 2009 at 2:38am
The first argument for the RSSFeed method needs a DataObjectSet, like you could get with Children(). Calling Children() on that does not make much sense I think, because you can call that only on one item, not on an entire set.
Not sure what you're trying to achieve: you want multiple rss feeds or one that combines all of them?
If you want 'all' of them in one, you could just do a DataObject::get("YourPageType", "WHERE", "SORTBY") and take that as the argument for the RSSFeed method.
Hope this makes some sense.
13 October 2009 at 3:04am
That's a really good idea-- thanks @dio5! I will do exactly that.
|Go to Top|