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

Forums / General Discussions / Hide Comemnts in news RSS feeds

Hide Comemnts in news RSS feeds

4 posts, 0 answered
  1. shraddha
    shraddha avatar
    87 posts
    Registered:
    18 May 2009
    08 Jun 2010
    Link to this post
    Hi,
    I have created RSS feed for news and it is working fine.
    Only thing is I want to remove comment link after every article heading. How can I achieve that??

    --Thanx
    Shraddha
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Jun 2010
    Link to this post
    Hello shraddha,

    You can hide "Comments" link by creating a custom handler that inherits from Telerik.Rss.RssHttpHandler. Override GetContentData and return a new StringWriter -return (object)writer.ToString(); where you have excluded the <commnets></commnets> tags from the feedInfo.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. shraddha
    shraddha avatar
    87 posts
    Registered:
    18 May 2009
    08 Jun 2010
    Link to this post
    Hi ,
    Thanx for the reply
    I have created custom handler and method.
    but i have not understand last part i.e. "where you have excluded the <commnets></commnets> tags from the feedInfo". Please explain in detail.

    --Thanx
    Shraddha
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Jun 2010
    Link to this post
    Hello shraddha,

    Create a StringWriter for the RssFeedInfo and exclude the comments from the value that is returned. You have to replace all instances of RssHttpHandler in the web.config, so that the application will start using the new handler.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
4 posts, 0 answered