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?
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.