Hi there,
I have a number of mp3 files in a separate folder and have created an asset listing (using file type) page to display and link to those files.
I now wish to create an RSS feed from that asset listing.
I've followed the directions in the News Manual for creating an RSS feed - but no matter what I do it will not pick up any of the items - these happily display in the associated asset listing. It will display the channel information in the RSS XML, but no items appear in the XML.
Are there any issues with using the "file" type for the RSS feed - similar RSS feeds based on standard pages work with no problems - but I just cannot get the any items to display in the RSS feed for the asset type file.
Running Matrix v3.12.4
Cheers,
Geoff
Creating RSS feed from file type asset listing
Hey Geoff,
I'm a huge fan of RSS and sharing XML data and have found that the best way to do more complicated RSS in mysource (itunes library feeds / podrolls / img galleries and so on) is to create it manually and not use the news RSS asset.
Create a new design with a parse file like:
<?xml version="1.0"?>
Then use an standard asset listing (make sure to get rid of all the DIV elements) and make yout type format something like:
%asset_name% %asset_attribute_summary% %asset_created_rfc2822%
Apply your new design to your asset listing and you should be happy with the results. Doing it this way helps you scale up and down your RSS feeds without being limited to the standard keywords that can be drawn from an item in the RSS asset builder screen.
For example you can add itunes codes like:
Duncan Robertson %asset_attribute_name% %asset_attribute_summary%
That worked for me fine in 3.12 up...
Goodluck.
Hello, are there any special permissions needed for this?
As it works when i'm logged in, but when I'm public user, it fails?
You would need Public Read on the RSS Feed asset, as well as the asset listing and all the assets the listing is listing. Hope that makes sense! Make sure the design you have applied (the blank one) is also Live with Public Read permissions.
ok what if the asset listing is from a form submission would that change some things?
ok for that to work you need to set compromising permissions to the submissions folder… if you can live with that then all is good
Yes -- by default we Deny public read on form submissions to protect the form data. If you are wanting to asset list and then RSS feed form submissions to the public, you would need to override this.
Hi Duncan,
I'm trying to apply your advice, but when I remove all the div elements, it kills my Asset Listing's ability to list the assets. I'm obviously missing something, any chance of a bit more detail on this? I'm using File Type Format - maybe that's the issue??
cheers,
Michael Macken
[quote]Hi Duncan,
I'm trying to apply your advice, but when I remove all the div elements, it kills my Asset Listing's ability to list the assets. I'm obviously missing something, any chance of a bit more detail on this? I'm using File Type Format - maybe that's the issue??
cheers,
Michael Macken[/quote]
Did you accidently delete the %asset_listing% keyword?
Well, not accidentally. If I leave it in each item in my feed gets it's own Div, so I tried zapping it. I applied the 'XML' design to the main Asset Listing page - I'll try applying it to the format page as well, maybe it did not cascade or something. The feed it was producing looked kinda close except for all the Divs. Thanks for responding (I'll put the keyword back in too).
Michael
Not sure, I'd have to have a closer look. Do you have a URL for us to take a peek at?
[quote]Well, not accidentally. If I leave it in each item in my feed gets it's own Div, so I tried zapping it. I applied the 'XML' design to the main Asset Listing page - I'll try applying it to the format page as well, maybe it did not cascade or something. The feed it was producing looked kinda close except for all the Divs. Thanks for responding (I'll put the keyword back in too).
Michael[/quote]
Are you sure that you set the presentation style to RAW HTML in your type format?
Hmmm, this is getting frustrating. It’s close to working, the channel data shows in a feed viewer, but not the items (well there’s only one at this stage). Here’s the link of the feed:
http://uws.clients.squiz.net/writing_society/writing_and_society/podcasts/special_listing_page_for_itunes_rss
My design page has this in the parse file:
[codebox]<MySource_PRINT id_name=“global” var=“content_type” content_type=“application/rss+xml” />
<?xml version=“1.0” encoding=“iso-8859-1”?><rss version=“2.0”>
<mysource_area id_name=“body” design_area=“body” />
</rss>
[/codebox]
My Listing Page Contents are:
[codebox]<channel>
<title>UWS Writing and Society Research Group</title>
<link>http://uws.clients.squiz.net/writing_society/writing_and_society</link>
<description>The latest activities from the Writing and Society Research Group at the University of Western Sydney</description>
<copyright>University of Western Sydney</copyright>
<webMaster>m.macken@uws.edu.au (Michael Macken)</webMaster>
<managingEditor>k.olive@uws.edu.au (Kathleen Olive)</managingEditor>
<category>Education</category>
<image>
<title>UWS Writing and Society Research Group</title>
<description>University of Western Sydney</description>
<url>http://future.uws.edu.au/__data/assets/image/0019/32149/UWS_Blue_logo.gif</url><width>119</width><height>75</height>
<link>http://uws.clients.squiz.net/writing_society/writing_and_society</link>
</image>
<itunes:author>Kathleen Olive</itunes:author>
<itunes:summary>The latest activities from the Writing and Society Research Group at the University of Western Sydney</itunes:summary>
<itunes:owner>
<itunes:name>Kathleen Olive</itunes:name>
<itunes:email>k.olive@uws.edu.au</itunes:email>
</itunes:owner>
<itunes:image href=“http://future.uws.edu.au/__data/assets/image/0019/32149/UWS_Blue_logo.gif” />
<itunes:category text=“Education”>
<itunes:category text=“Research”/>
<itunes:category text=“Writing & Society”/>
</itunes:category>
%asset_listing%
</channel>
[/codebox]
My Type Format page has:
[codebox]<item>
<title>%asset_short_name_linked%</title>
<description>%asset_metadata_Description%</description>
<enclosure url="%asset_url%" length="%asset_file_size_in_bytes%" type="%asset_metadata_File.Type%" />
<pubDate>%asset_created_rfc2822%</pubDate>
<itunes:author>Kathleen Olive</itunes:author>
<itunes:subtitle>%asset_attribute_name%</itunes:subtitle>
<itunes:summary>%asset_metadata_Description%</itunes:summary>
<itunes:duration>%asset_metadata_Duration%</itunes:duration>
</item> [/codebox]
They’re all Raw HTML now. Even the image shows up ok, but no item. Thanks in advance.
Michael
I am getting warnings that it is an invalid feed. If I were you, I would actually give the file a .rss files extension, but that might not fix your problem. There is some white space in your file before and after the channel tags, not sure if this is causing it.
What do you mean the item is not showing up? Like the keywords are not being printed?
By Item I was referring to an "episode" of the podcast series.
I woke up this morning and remembered - missing iTunes declaration! I added this to the Design asset:
[codebox]<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">[/codebox]
in place of
[codebox]<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0">[/codebox]
and it seems to work now - although it's not validating yet. I'll address the validation issues now.
Thanks,
Michael