More in this section
Forums / General Discussions / Resolving the url of news items to use in RadRotator in Sitefinity 3.7

Resolving the url of news items to use in RadRotator in Sitefinity 3.7

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Enrique Coronel
    Enrique Coronel avatar
    17 posts
    10 Jul 2008
    03 Mar 2011
    Link to this post
    Actually i was writing a code-behind of a RadRotator control in Sitefinity 3.7 who shows the items of the news module and the links of these items, but i don't find the way to obtain this links, i read something of the LinkManager in this article but don't found more information of the use of this method. Could you help me please?. I attached the code-behind.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.ComponentModel;
    using Telerik.Web.UI;
    using Telerik.Cms;
    using Telerik.News;
    using System.Collections;
    using Telerik.Cms.Engine;
    using Telerik.Web.UI.Editor;
    public partial class User_Controls_NewsRotator : System.Web.UI.UserControl
        protected void Page_Load(object sender, EventArgs e)
            Telerik.News.NewsManager newsManager = new Telerik.News.NewsManager("News");
            this.RadRotator1.DataSource = newsManager.Content.GetContent();
            RadRotator1.ItemDataBound += new RadRotatorEventHandler(RadRotator1_ItemDataBound);
        void RadRotator1_ItemDataBound(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
            var title = e.Item.FindControl("newsTitle") as Label;
            var text = e.Item.FindControl("newsText") as Label;
            var link = e.Item.FindControl("newsLink") as HyperLink;
            if (title != null) title.Text = DataBinder.Eval(e.Item.DataItem, "Title").ToString();
            if (text != null) text.Text = DataBinder.Eval(e.Item.DataItem, "Summary").ToString();
            if (link != null)
                link.Text = DataBinder.Eval(e.Item.DataItem, "Title").ToString();
                //link.NavigateUrl = instance.LinkManager();
        public string GetItemUrl(string provider, Guid id, bool resolveAsAbsoluteUrl)
            if (ContentManager.Providers.ContainsKey(provider))
                IContent cnt = ContentManager.Providers[provider].GetContent(id);
                if (cnt != null)
                    return VirtualPathUtility.ToAbsolute(cnt.UrlWithExtension, this.Context.Request.ApplicationPath);
                // we assume it is a page
                SiteMapNode node = SiteMap.Provider.FindSiteMapNodeFromKey(id.ToString());
                if (node != null)
                    return this.ResolveClientUrl(node.Url);
            return String.Concat("Item not found: [", provider, "]", id);

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    03 Mar 2011
    Link to this post
    Hi Luis,

    You can resolve the link by using

    string text = " your content here with dynamic url";

    text = LinkParser.ResolveLinks(text, ContentManager.ResolveItemUrl, null, true, false);

    So you should call the  LinkParser.ResolveLinks or pass the needed parameters to method you already have ( you are not calling the method in your code)

    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
2 posts, 0 answered