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

Forums / Bugs & Issues / RSS Feed Item Description

RSS Feed Item Description

6 posts, 0 answered
  1. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    07 May 2009
    Link to this post
    I set up an RSS Feed containing a certain category of News items and configured it to return "Title and Summary".  I expected it to return the "Excerpt" property of the news Item as the description but instead it returned the first 50 words of the actual item content.  It seems to me that the Excerpt would be a better fit for the Description (at least when it actually contains something).  Is there a way to accomplish this?  We are running 3.6 SP1.

    Thanks,

    Zack
  2. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    09 May 2009
    Link to this post
    Hello Zack,

    I am sorry, but this is the way we implemented it. There is no Excerpt property, but rather a Summary metafield. It is used by the NewsView control. RSS for news, however, summarizes the content itself.

    If you want to change this behavior, you will have to inherit the News module, and override the GetRssProviders method, where you will return your provider.

    Here comes the crucial step: you need to implement an RSS provider. It should implement Telerik.Cms.Engine.RssChannelProvider. For the sake of simplicity, you will inherit Telerik.News.Rss.RssChannelProvider. In the RSS provider, override these methods:
    • Initialize
      As a parameter you wil get a dictionary of settings. The code for your method should be something like:
      base.Initialize(settings); 
       
      if (settings.TryGetValue(RssChannelProvider.KeySummarySettings, out val) && !String.IsNullOrEmpty(val)) 
          this.summarySettings = SummarySettings.Parse(val); 
      else 
          this.summarySettings = SummarySettings.Default; 
      where this.summarySettings is a field of type Telerik.Cms.Engine.SummarySettings, found in Telerik.Cms.Engine.dll
    • SetDescription
      Your code should be something like:
      protected override void SetDescription(RssItem item, IContent content) 
          string text; 
          if (this.summarySettings.Mode != SummarySettings.SummaryMode.None 
              && this.summarySettings.Mode != SummarySettings.SummaryMode.MetaField) 
          { 
              // apply your logic here 
              // the final summary will be in the text local variable 
          } 
          else 
          { 
              base.SetDescription(item, content); 
          } 
          item.Description = LinkParser.ResolveLinks(text, this.GetItemUrl); 

    If you have more questions, we will be happy to assist you.

    Best wishes,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    12 May 2009
    Link to this post
    Dido,

    Thank you for your detailed reply.  I sincerely appreciate your attention to detail.  That being said, as a customer I'd just like to add my two cents worth ... it seems to me that this should be something that we should be able to configure within Sitefinity (in the RSS feed configuration, for example) rather than have to write custom code to make it happen.  I would love to see that added as a feature in 4.0, if not sooner.  I do understand why in many scenarios (syndicating content for RSS readers, for example) it may make sense to include the main content in the feed, but it doesn't make sense in my situation where I am merely trying to get back a summary of and link to each news item.  Again just my opinion ... thanks again for all your help.

    Best,

    Zack
  4. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    14 May 2009
    Link to this post
    Hello Zack,

    Thank you very much for your feedback! I have posted this for internal discussion, and we will try to come up with a better approach.

    We greatly appreciate user feedback, as this is what makes us evolve!

    Kind regards,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. George
    George avatar
    1 posts
    Registered:
    14 Dec 2008
    15 Oct 2009
    Link to this post
    I am setting up RSS feeds for a news reel. I specify reed details but get an error that my description is too long. Max of 256 chars. My description is only 220 chars and it throws same error with just one character! Any idea why? We are running 3.7_1990.
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    21 Oct 2009
    Link to this post
    Hi Lisa Adkins,

    Thank you for using our services.

    We have tried to reproduce this issue in your version of Sitefinity, however we were not able to. The only time the exception got thrown was when we entered more than 256 chars. The steps we have taken to test this:

    1) Create a feed
    2) Enter acceptable description
    3) Save. Works OK
    _________

    1) Create another feed
    2) Enter description more than 256.
    3) Try to save and exception gets thrown.
    4) Go back and edit description to be in acceptable limits, save and it creates feed as it should.

    Have you experienced this issue every time you create a feed or it was just once? Can you try and create a feed without entering anything in the description?

    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered