maartenba / MvcSiteMapProvider

An ASP.NET MVC SiteMapProvider implementation for the ASP.NET MVC framework.
Microsoft Public License
537 stars 220 forks source link

MvcSiteMapProvider Generate wrong URL #478

Open MuhammadAbdelsalam opened 6 years ago

MuhammadAbdelsalam commented 6 years ago

Hi,

I already configure the MvcSiteMapProvider but when i use with custom route generate right breadcrumb titles with urls without controller and action.

kindly find sample from my route and xml configuration.

and route

routes.MapRoute( name: "LookupsLocalized", url: "{lang}/Lookups/{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } , namespaces: new[] { "Linkdev.MofaicAid.Internal.Web.Controllers.Lookups" } );

routes.MapRoute( name: "DefaultLocalized", url: "{lang}/{controller}/{action}/{id}", constraints: new { lang = @"(\w{2})|(\w{2}-\w{2})" }, // en or en-US defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });