Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

How do I generate a Media RSS Feed?


3 Posts   1749 Views


28 October 2008 at 1:02pm (Last edited: 28 October 2008 2:14pm), Community Member, 190 Posts

Does RSSFeed support Media RSS? I'd like to include mp3's of a radio show in the feed.

I tried:

// RSS
function init() {
RSSFeed::linkToFeed($this->Link() . "rss");
function rss() {
$rss = new RSSFeed($this->LatestUpdates(), $this->Link(), "Pet World", "", "Title", "Content", "AudioFile");

function LatestUpdates() {
// 5 is the number of items listed
return DataObject::get("AudioPetWorldPage", "", "Created Desc", "", 5);

Everything works except the audio file.



1 November 2008 at 12:03pm Forum Moderator, 801 Posts

MediaRSS is a separate specification - its not "auto-detected" in any way in the RSSFeed class that you want your output to comply to this specification. Have a look here:

Your best bet is to subclass RSSFeed and overload some of the methods and/or create new ones for the things specific to MediaRSS. Let us know how you go on, this could be a nice addition for a little module or recipe!


3 November 2008 at 4:40pm Community Member, 190 Posts

Thanks Ingo for the response. That probably exceeds my knowledge but maybe a co-worker and I can figure something out. If we do, we'll definitely post our results.