Does MVC 4 have an integrated sitemap solution?

I watched ASP.NET MVC 4 and it seems that System.Web.SiteMapProvider does not support MVC functions such as controller and action names.

After a quick search, I noticed that many people create their own provider and / or custom solution.

So this made me think: is there a reason the MVC team did not work on the MAP Site MAP provider? Is there a more elegant way or even better practice for working with menus and breadcrumbs in a large project?

I appreciate any comments. Thanks in advance;

+6
source share
1 answer

There is nothing built-in for SiteMaps in ASP.NET MVC.

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

MvcSiteMapProvider is based on the names of the areas, the controller, and the name of the action method, and not on fixed URL links.

+2
source

Source: https://habr.com/ru/post/920506/


All Articles