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

Forums / Bugs & Issues / Special Characters (TM) in Breadcrumb

Special Characters (TM) in Breadcrumb

2 posts, 0 answered
  1. Rick
    Rick avatar
    1 posts
    Registered:
    23 Jun 2010
    23 Jun 2010
    Link to this post
    Several of the menu items in my site use &$153; to add the TM symbol to particular trademark text.
    When this text is displayed in the breadcrumbs the special character is not rendered as TM but the base code is displayed. The same HTML works fine in the RadPanel control.

    Is there another way for me to add the TM symbol to the Menu Text?

    Thanks

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Jun 2010
    Link to this post
    Hello Rick,

    You should use &#153 as a menu label. You need to create a custom Breadcrumb control and decode the html text

    sample code

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Cms.Web.UI;
    using Telerik.Cms.Web;
    using System.Web.UI.WebControls;
     
    /// <summary>
    /// Summary description for BreadCrumbCustomControl
    /// </summary>
    public class BreadCrumbCustomControl : Breadcrumb
    {
        public BreadCrumbCustomControl()
        {
        }
     
        protected override void InitializeItem(System.Web.UI.WebControls.SiteMapNodeItem item)
        {
            base.InitializeItem(item);
            if (item.ItemType != SiteMapNodeItemType.Root)
            {
                var i = item.SiteMapNode;
                CmsSiteMapNode node = i as CmsSiteMapNode;
                if (node != null)
                {
                    string nt = node.Title;
                    if (nt == "™")// RadEditor will encode this and convert the value to tm
                    {
                        item.Visible = false;
                        // crate a literal ot hyperlink control and decode the node Title.
     
                    }
                }
            }
        }
    }


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