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

Forums / Developing with Sitefinity / Telerik.Cms.Web.UI.Breadcrumb in 3.7 - where is it in 4.1?

Telerik.Cms.Web.UI.Breadcrumb in 3.7 - where is it in 4.1?

3 posts, 0 answered
  1. Ron
    Ron avatar
    13 posts
    Registered:
    25 Apr 2011
    06 Jul 2011
    Link to this post
    I have the following code to display breadcrumb in 3.7
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Web;
     
    namespace Controls
    {
        public class HomeBreadcrumb : Telerik.Cms.Web.UI.Breadcrumb
        {
            private bool mRenameFirstDisplayedItem;
     
            protected override void OnLoad(EventArgs e)
            {
                base.OnLoad(e);
     
                // Initialize variables.
                this.CurrentNodeStyle.CssClass = this.RootNodeStyle.CssClass = this.PathSeparatorStyle.CssClass = this.NodeStyle.CssClass = "crumb";
                this.CssClass = "crumbs";
            }
     
            protected override void InitializeItem(System.Web.UI.WebControls.SiteMapNodeItem item)
            {
                base.InitializeItem(item);
     
                if (item.ItemType == System.Web.UI.WebControls.SiteMapNodeItemType.Root)
                {
                    if (this.ShowStartingNode)
                    {
                        item.SiteMapNode.Title = "Home";
                    }
                    else { this.mRenameFirstDisplayedItem = true; }
                }
                if (item.ItemType == System.Web.UI.WebControls.SiteMapNodeItemType.Parent || item.ItemType == System.Web.UI.WebControls.SiteMapNodeItemType.Current)
                {
                    if (!this.ShowStartingNode && this.mRenameFirstDisplayedItem)
                    {
                        item.SiteMapNode.Title = "Home";
                        this.mRenameFirstDisplayedItem = false;
                    }
                }
            }
        }
    }

    Can someone send me the equivalent in SF 4.1? Thanks in advance!
  2. Ron
    Ron avatar
    13 posts
    Registered:
    25 Apr 2011
    06 Jul 2011
    Link to this post
    Nevermind...found it. Using System.Web.UI.WebControls.SiteMapPath in place ofTelerik.Cms.Web.UI.Breadcrumb. Now I'm getting specified method is not supported:item.SiteMapNode.Title = "Home";
  3. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    07 Jul 2011
    Link to this post
    Hello Ron,

    If you are plan to implement a breadcrumbs navigation control please refer to the following article where I have posted a sample code which works flawlessly when creating such type of control.

    All the best,
    Victor Velev
    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
3 posts, 0 answered