Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • prl 32 posts 54 karma points
    Feb 03, 2010 @ 17:44
    prl
    0

    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.

  • dandrayne 1138 posts 2262 karma points
    Feb 03, 2010 @ 18:01
    dandrayne
    1

    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?

    <xsl:value-of select="umbraco.library:ChangeContentType('application/rss+xml')"/>

    Dan

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Feb 03, 2010 @ 18:05
    Nik Wahlberg
    0

    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:

    <xsl:value-of select="umbraco.library:ChangeContentType('String MimeType')"/>

    -- Nik

  • prl 32 posts 54 karma points
    Feb 03, 2010 @ 18:14
    prl
    0

    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!

  • dandrayne 1138 posts 2262 karma points
    Feb 03, 2010 @ 18:27
    dandrayne
    0

    I think chrome is still lacking a built-in RSS reader, but glad you got it sorted.

    Dan

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Apr 21, 2011 @ 10:22
    Biagio Paruolo
    0

    Could you post XSLT?

Please Sign in or register to post replies

Write your reply to:

Draft