+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Display items from external RSS feed?

Display items from external RSS feed?

7 posts, 0 answered
  1. Nancy
    Nancy avatar
    35 posts
    Registered:
    10 Apr 2012
    11 May 2012
    Link to this post
    Our client would like to display items from an external RSS feed in the sidebar on a page of their site. Is there a control that will do this?
  2. Nancy
    Nancy avatar
    35 posts
    Registered:
    10 Apr 2012
    11 May 2012
    Link to this post
    I stopped looking for a control and built a very simple one that uses an XMLDataSource and DataList. Works great.
  3. Drew
    Drew avatar
    1 posts
    Registered:
    13 Jul 2012
    21 Aug 2012
    Link to this post
    +1 I would find this great out-of-the-box functionality also.

    Drew Robson ssw.com.au
  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    08 Dec 2016
    21 Aug 2012
    Link to this post
    Hi,

    XMLDataSource control will really be a very good choice in displaying any RSS feed in user control
    ascx.
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="XML.ascx.cs" Inherits="SitefinityWebApp.Custom.XML" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
      
    <asp:XmlDataSourceID="XmlDataSource1"runat="server">
      
    </asp:XmlDataSource>
      
    <asp:RepeaterID="Repeater1"runat="server"DataSourceID="XmlDataSource1">
      
    <ItemTemplate>
    <%#XPath("link")%>"> <%#XPath("title")%>
      
    </ItemTemplate>
      
    <SeparatorTemplate>
      
    <hr/>
    </SeparatorTemplate>
      
    </asp:Repeater>

    Code behind:

               XmlDataSource1.XPath = "rss/channel/item";
               XmlDataSource1.Data= "XmlDataSource1";
               XmlDataSource1.DataBind();
    also you can consume RSS feed from Sitefinity and publish it as Sitefinity content.

    Regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Corby
    Corby avatar
    48 posts
    Registered:
    19 Sep 2011
    11 Jul 2013 in reply to Stanislav Velikov
    Link to this post
    Stanislav, tnx for the details.  Just tried this and it works fine.  Though, for others, there were a few typos that should be addressed if you copy/paste from the post above.

    <asp:XmlDataSourceID="XmlDataSource1"runat="server">  //need space between XmlDataSource and ID.

    <asp:RepeaterID="Repeater1"runat="server"DataSourceID="XmlDataSource1">  //same, need space betwen Repeater and ID.

    <%#XPath("link")%>"> <%#XPath("title")%>  //Extra "> after the "link" xpath.

    Here's similar code with slight adjustments:

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="XML.ascx.cs" Inherits="SitefinityWebApp.Custom.XML" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
       
    <asp:XmlDataSource ID="XmlDataSource1" runat="server"></asp:XmlDataSource>
    <asp:Repeater id="Repeater1" runat="server" DataSourceID="XmlDataSource1">
    <ItemTemplate>
    <h2>
       <%#XPath("title")%>
    </h2>
        <strong><%#XPath("pubDate")%> </strong><br />
        <br />
      <a href="<%#XPath("link")%>">Read Full Story >> </a>
    </ItemTemplate>
    <SeparatorTemplate>
    <hr/>
    </SeparatorTemplate>
    </asp:Repeater>

  6. Marz
    Marz avatar
    7 posts
    Registered:
    29 Aug 2012
    24 Mar 2014
    Link to this post

    Please vote for this feature request if you think 'Rss feed reader control' should be an out of the box feature in future revisions of Sitefinity.

     http://feedback.telerik.com/Project/153/Feedback/Details/123666-rss-feed-reader-control

     Thanks

  7. David
    David avatar
    99 posts
    Registered:
    06 Sep 2012
    25 Mar 2014
    Link to this post

    I have used the approach the approach Stanislav Velikov mentioned, where you consume an RSS feed from Sitefinity and publish it as Sitefinity content. That approach worked very well for my needs. The key settings to look at are:

    • Content to include: Set this to "http://www.eyefootball.com/rss_news_main.xml"
    • Publish as: This is where you set it to the Sitefinity artifact you want to import the content to. In my case I published it as Sitefinity news.

    You can then schedule the import to occure daily, hourly ect. The reason I like this approach is that if the external feed goes down your site will still be able to display the already imported feeds.

     

     

     

7 posts, 0 answered