Copied to clipboard

Flag this post as spam?

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


  • nadine 25 posts 75 karma points
    Dec 08, 2009 @ 07:35
    nadine
    0

    RSS Feed Template not displaying

    I'm fairly new to Umbraco and I'm trying to get an RSS Feed working have tried for hours and have had no success.

    I've got Warren Buckley's CWS2 package installed.

    Steps so far:

    1. Created XSLT file: (newslist2.xslt) from the RSS Feed Template (also created macro)
    2. Added parameters for number of items, title and description to the macro
    3. Put macro variables into XSLT file

    This is where it gets blurry for me...

    Ideally I want it displayed on my home page

    I've tried inserting the macro into the home page template as part of the SideBarContent by referencing it by its alias. It just put the url in and then starts to display content from another page of the site.

    I've tried putting it into it's own template and making it a sub template. Nothing

    Am I missing something conceptually here as I can't get Warren's to work either?

  • wolulcmit 357 posts 693 karma points
    Dec 13, 2009 @ 13:09
    wolulcmit
    0

    Hi Nadine,

    I might be able to help, having just played around with this too.....

    The default feed template should do the trick... I did have to make one alteration to get the browser to recognise it as a valid rss feed though, which was to remove this line: <xsl:text disable-output-escaping="yes">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</xsl:text>
    and instead put that line in the template for your rss feed - for example:

    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"><?xml version='1.0' encoding='UTF-8'?>
    <umbraco:Macro Alias="RSS_feed" runat="server"></umbraco:Macro>
    </asp:Content>

    I think this is important becausethe XML declaration needs to come on the first line that the browser reads... and that wasn't happening for me in the orginal scenario.

    then you can generate as many rss feed as you like by referencing existing content, but just specifying that your RSS template be used instead of those specified at the back end.

    for example:
    http://www.yoursite.com/home.aspx?altTemplate=RSS_Feed

    using altTemplate in the url string is a pretty neat trick I reckon.

    - Tim

     

  • nadine 25 posts 75 karma points
    Dec 15, 2009 @ 03:54
    nadine
    0

    Hi Tim

    thanks for that, it did do the trick. I got it working only to realise it's for a newsfeed of my site. If I'd looked at the XSLT code harder I should have picked that up. I want to display articles from a newsfeed from another site - back to the drawing board.  You wouldn't happen to know the best way to do this would you?

    -Nadine

  • wolulcmit 357 posts 693 karma points
    Dec 15, 2009 @ 16:37
    wolulcmit
    0

    ahhh... yep so you want to aggregate a feed from another site onto yours right?
    You can use the runwayfeedviewer for that.

    install runway on a fresh install (if you want to be safe) and take a look at the feedviewer module (developer>packages>runway modules)

    Alternatively you could also check out Darren's feedcache package, which will cache any feeds that you're using onto your own server and then periodically update them... this is handy as your site will still have something to show in the event that the feed you're linking to breaks :)
    http://our.umbraco.org/projects/feed-cache - I *think* it's got pretty good documentation too.

    - Tim

Please Sign in or register to post replies

Write your reply to:

Draft