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

[Solved] Unable to load sitemap into the menu

1 Answer 25 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.
Patrice
Top achievements
Rank 1
Patrice asked on 27 Sep 2010, 04:22 AM
hi,
I tried to load the sitemap (http://mvcsitemap.codeplex.com/)
I put into the global.asax the line of code :
SiteMapManager.SiteMaps.Register<XmlSiteMap>("MainAppSiteMap", sitemap => sitemap.LoadFrom("~/Mvc.sitemap"));
In the file Site.Master:
Html.Telerik().Menu().Name("MainMenu").BindTo("MainAppSiteMap").Render();
I also validate in my siteMap file if all the controllers and actions was right.. and they were.
it looks like the sitemap is not loaded.
Well, I did another test which was to manually add item into the menu and it worked fine.
Html.Telerik().Menu()
       .Name("Menutest")
       .Items(items =>
       {
           items.Add().Text("Item 1");
           items.Add().Text("Item 2");
       }).Render();

There is any thing special that I need to do if I want to use the menu?


1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 27 Sep 2010, 08:54 AM
Hello Patrice,

I will suggest you check these forum threads open on the same matter:
1.
http://www.telerik.com/community/forums/aspnet-mvc/menu/menu-bind-sitemap-inside-a-masterpage.aspx
(more particularly Kazi Manzur Rashidr's answer )

2.
http://www.telerik.com/community/forums/aspnet-mvc/panelbar/panelbar-not-working-with-mvc-sitemaps.aspx

Kind regards,
Georgi Krustev
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
Patrice
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or