Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does MVC 4 has a built in sitemap solution?

Tags:

asp.net-mvc

I was looking at ASP.NET MVC 4 and it appears that System.Web.SiteMapProvider doesn't have support for MVC features like controller and action names.

After a quick search I noticed a lot of people are creating their all provider and/or custom solution.

So it made me think: is there a reason the MVC team didn't work on a MVC Site MAP provider? Is there a more elegant way, or even a best practice to deal with menus and breadcrumbs on a large project?

I appreciate any comments. Thanks in advance;

like image 480
E. Brito Avatar asked Jul 14 '12 21:07

E. Brito


1 Answers

No there is nothing built-in for SiteMaps in ASP.NET MVC.

You should look at MvcSiteMapProvider which is an ASP.NET MVC SiteMapProvider implementation for ASP.NET MVC - although I dont think it has been tested with MVC 4.

MvcSiteMapProvider is based on areas, controller and action method names as opposed to fixed URL references.

like image 139
Judo Avatar answered Nov 15 '22 05:11

Judo