I'm creating an RSS Feed for my site. I created an XSLT file from the XSLT templates that umbraco has and changed the variable (title, url, ...) values. I also created a template where I reference my RSS macro (created when I created the XSLT). Then I added the line "<link rel="alternate" type="application/rss+xml" title="RSS" href="/main/rss.aspx" />" to my master template, so I now have the RSS icon on the address bar. When I click it, I go to the RSS page where I have the button to subscribe the RSS.. all perfect up to here!
But, I want to have an icon on my page so that the user can click it and go to the RSS page I mentioned above so he can subscribe the RSS. This is where the problem is. When I try to access the RSS link directly (in this case http://localhost:port/main/rss.aspx), I only have the RSS xml file listed as, well, an xml file. Just text. I don't get the RSS page where I have the button to subscribe it.
Where am I failing here? What did I do wrong? I already wathed the UmbracoTV video about this and followed step by step to be sure I wasn't doing anything wrong, but still..
Different browsers will handle rss differently. My furst bet would be that you should change or make sure that the content type is being set to RSS. You can accomplish this in XSLT by doing the following:
Creating RSS Feeds
Hello,
I'm creating an RSS Feed for my site. I created an XSLT file from the XSLT templates that umbraco has and changed the variable (title, url, ...) values. I also created a template where I reference my RSS macro (created when I created the XSLT). Then I added the line "<link rel="alternate" type="application/rss+xml" title="RSS" href="/main/rss.aspx" />" to my master template, so I now have the RSS icon on the address bar. When I click it, I go to the RSS page where I have the button to subscribe the RSS.. all perfect up to here!
But, I want to have an icon on my page so that the user can click it and go to the RSS page I mentioned above so he can subscribe the RSS. This is where the problem is. When I try to access the RSS link directly (in this case http://localhost:port/main/rss.aspx), I only have the RSS xml file listed as, well, an xml file. Just text. I don't get the RSS page where I have the button to subscribe it.
Where am I failing here? What did I do wrong? I already wathed the UmbracoTV video about this and followed step by step to be sure I wasn't doing anything wrong, but still..
Thanks in advance.
Hmm, all seems well with your approach so far.
What about adding the RSS MIME type to that xslt file, so the browser should know how to treat it?
Dan
Different browsers will handle rss differently. My furst bet would be that you should change or make sure that the content type is being set to RSS. You can accomplish this in XSLT by doing the following:
-- Nik
dandrayne,
That's it! The XSLT template for the RSS Feeds has the line: <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/> .
I just changed it to what you said and voilá.
It just doesn't work on google chrome. It lists the page as text (not even as xml).
Thanks!
I think chrome is still lacking a built-in RSS reader, but glad you got it sorted.
Dan
Could you post XSLT?
is working on a reply...