This question is locked. New answers and comments are not allowed.
When adding list items that contain hyperlinks to a menu, I initially tried using the Action method:
However, I noticed this adds the "t-state-selected" class to the list items, which changes the background. I then tried to use the Url method but had the same results:
Lastly, I tried passing a simple string to the Url method and I was finally able to generate the menu without adding the "t-state-selected" class on the list items:
Interestingly, if I specify "HighlightPath(false)" on the menu and specify a controller and action to define the URL, the "t-state-selected" class is not added to the list items and the menu is rendered as I would expect.
Can you confirm this behavior and if there is a preferred way to set list items that contain hyperlinks if this is not considered a bug?
item.Add().Text("Item 1").Action<TestController>(action => action.Index())However, I noticed this adds the "t-state-selected" class to the list items, which changes the background. I then tried to use the Url method but had the same results:
item.Add().Text("Item 1").Url(Url.Action(MVC.Test.Index())); // T4MVC used to define ActionResultLastly, I tried passing a simple string to the Url method and I was finally able to generate the menu without adding the "t-state-selected" class on the list items:
item.Add().Text("Item 1").Url("http://www.telerik.com");Interestingly, if I specify "HighlightPath(false)" on the menu and specify a controller and action to define the URL, the "t-state-selected" class is not added to the list items and the menu is rendered as I would expect.
Can you confirm this behavior and if there is a preferred way to set list items that contain hyperlinks if this is not considered a bug?