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

Forums / Developing with Sitefinity / News Module - RSS article link customization

News Module - RSS article link customization

2 posts, 0 answered
  1. Dan
    Dan avatar
    11 posts
    Registered:
    17 Sep 2012
    10 Feb 2011
    Link to this post

    We're using the out-of-the-box Sitefinity news module, as well as the related news RSS feeds.  We've created custom controls for displaying the news articles, and I'm running into a problem with the way the RSS feed is building the link to each news article.  It strips special characters from the title in the link, so when I try to find the the news article (using GetContent),  the article is not found, because the title doesn't match.  Is there a way I can control how the article links are built in the RSS feed without creating a completely new RSS provider?

    Here's an example:

    Article title:
    my article title (version 1)

    Rss link:
    my_article_title_version_1.aspx

    After replacing the underscores with spaces, I still don't have an exact match with the article title:

    my article title (version 1) != my article title version 1

    I'm not seeing a way to handle this in the lookup / filter either:

    NewsManager mgr = new NewsManager("News");
    List<IMetaSearchInfo> filter = new List<IMetaSearchInfo>();
    filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "Title", articleName));
    IList contentList = mgr.Content.GetContent(filter.ToArray());

    Any help on this would be appreciated.

    Thanks, DanO

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Feb 2011
    Link to this post
    Hello Dan,

    The RSS provider constructs urls to content items based on their UrlRewriteFormat configured in the <cmsengine> configuration section. The url for each items is stored in the UrlWithExtension property. What you can do in the case would be to GetContent() based on some filtering then use Linq and filter the results with a lamda expression for the UrlWithExtension property.

    All the best,
    Radoslav Georgiev
    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
2 posts, 0 answered