This is a migrated thread and some comments may be shown as answers.

HTML in Menu Text in Q1 2010 version

1 Answer 42 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frank
Top achievements
Rank 1
Frank asked on 10 Apr 2010, 12:23 AM
In version 2009_3_1320, inserting HTML in the MenuItem.Text like this:
item.Add()  
    .Text("Organization Staff <span class=\"EntityCountWrapper\">(<span class=\"EntityCount\">" + Entities.Count().ToString() + "</span>)</span>")  
 
worked as expected with the menu item displayed as
Organization Staff (6)

In version 2010_1_309, it no longer works this way, but displays
Organization Staff <span class "EntityCountWrapper">(<span class="EntityCount">6</span>)</span>

Is there a way to recreate the previous functionality in the new version?

Frank

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 12 Apr 2010, 07:20 AM
Hello Frank,

In more recent builds, we added an Encoded(false) property to the NavigationItemBuilder. You fix the problem in the NavigationHtmlBuilderBase.cs file, the Text method, like this:

   public IHtmlNode Text(TItem item)
   {
       return new LiteralNode(Component.GetItemText(item, ActionMethodCache));
   }


Best wishes,
Alex Gyoshev
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.
Tags
Menu
Asked by
Frank
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or