Questions tagged [asp.net-mvc-sitemap]

MvcSiteMapProvider is a tool that provides flexible menus, breadcrumb trails, and SEO features for the ASP.NET MVC framework, similar to the ASP.NET SiteMapProvider model.

MvcSiteMapProvider is a tool targeted at ASP.NET MVC that provides menus, site maps, site map path functionality, and more. It provides the ability to configure a hierarchical navigation structure using a pluggable architecture that can be XML, database, or code driven. We have moved beyond a mere ASP.NET SiteMapProvider implementation to provide support for multi-tenant applications, flexible caching, dependency injection, and several interface-based extensibility points where virtually any part of the provider can be replaced with a custom implementation.

Based on areas, controller and action method names rather than hardcoded URL references, sitemap nodes are completely dynamic based on the routing engine used in an application. Search Engine Optimization support is also provided in the form of dynamic sitemaps XML, canonical URL tags, and meta robots tags to ensure you send the search engines consistent - rather than conflicting - information about your URLs.

It is open-source and hosted on Github. See the link also for documentation.

https://github.com/maartenba/MvcSiteMapProvider

59 questions
0
votes
1 answer

ASP.NET web app returns 404 for URLs ending with ".sitemap"

Our web service provides API similar to this: "/api/?parameter=". This API returns 404 without hitting our code if customer uses any values ending with ".sitemap". There is nothing in our codebase which does anything special…
ZakiMa
  • 5,637
  • 1
  • 24
  • 48
0
votes
0 answers

MVC sitemap menu and sub menu

Where to set to make selected item in menu sidebar as active and the submenu not collapsed? I am using Mvc.SiteMap to write my menu and submenu and the Template I Use is BeyondAdmin - Responsive Admin App
0
votes
1 answer

MvcSiteMapProvider Sitemap.xml endpoint breaks with custom route

I have a custom route to simplify the url and only use the home controller implicitly, but by doing so I can no longer access my sitemap.xml form the default endpoint, how could I fix this? 'routes.MapRoute( ' name:="OmitController", ' …
rojobo
  • 476
  • 4
  • 16
0
votes
1 answer

How to add parameters to mvcSiteMapNode?

I have an action in controller: public ActionResult Close(DocType docType) { return View(); } where DocType is a simple enum. I want to have 2 different links to the same action but with different parameters. I have tried this: …
Roman Koliada
  • 4,286
  • 2
  • 30
  • 59
0
votes
1 answer
0
votes
1 answer

@Html.MvcSiteMap().SiteMapPath() exception: "Ambiguous controller. Found multiple controller types

I'm using @Html.MvcSiteMap().SiteMapPath() to build breadcrumbs trail. I have two controllers, one is DealsController which inherited from class of DealsContorllerBase. The both classes has their own Index() methods, where child's Index() overrides…
0
votes
1 answer

Unable to render Html MvcSiteMap Nodes based on User Types

I have two user types- -Admin -Visitor If the user type is "Visitor" then the Sub1 node will not be there in the menu.But the below code doesn't work to hide/remove the specific node. My Sitemap looks like:
dev kolkata
  • 55
  • 1
  • 1
  • 9
0
votes
1 answer

Unit Testing MVC 5 Controllers that use SiteMaps.Current.CurrentNode

We have some controller actions that change the title of the breadcrumb node to be the value of the item the user is looking at e.g. [MvcSiteMapNode(Title = "{0}", ParentKey = "Maintenance-Settings-Index", Key = "Maintenance-Settings-Details",…
ASG
  • 957
  • 9
  • 20
0
votes
1 answer

MvcSiteMap breadcrums don't visible in view

I have the two similar views in which MVCSiteMap breadcrums are unvisible. On the others pages the same code works. Help me please to figure out why these two views don't show breadcrums. Mvcsitemap code:
0
votes
1 answer

MVCSitemapProvider Issue with custom Route

I having difficulty to use the MVCSitemapProvider to generate a sitemap my case is this: I have this : routes.MapRoute("Blog", "Blog/{id}/{seoName}", new { controller = "Blog", action = "ViewBlog", seoName = "" }, new { id = @"^\d+$" }); and I am…
Morphex
  • 306
  • 3
  • 15
0
votes
1 answer

Clicking MvcSiteMap Parent Node Toggles DropDown But Does Not Navigate to URL

I have a MvcSiteMap with a MvcSiteMapNode parent that contains child nodes. The parent node has a url and the children nodes have urls. When displayed, when the mouse hovers over the parent node, the child nodes appear below it, however when the…
Aaron Hoffman
  • 6,604
  • 8
  • 56
  • 61
0
votes
1 answer

Defalut XmlSiteMapProvider implementation cannot use SiteMap.FindSiteMapNode?

I just upgrade MvcSiteMapProvider from v3 to v4.6.3. I see the upgrade note indicate: In general, any reference to System.Web.SiteMap.Provider will need to be updated to MvcSiteMapProvider.SiteMaps.Current I am trying to get the sitemap node by…
Mike Wang
  • 87
  • 1
  • 9
0
votes
1 answer

mvcsitemapprovider show hide node in breadcrumbs based on url parameters

I am using mvcsitemapprovider in breadcrumbs. In certain section of the website, I want to show child nodes only if the parameters meet certain conditions. All nodes are already defined in Mvc.sitemap. I just want to hide them until URL parameters…
sarojanand
  • 607
  • 1
  • 11
  • 30
0
votes
1 answer

MvcSiteMapProvider visibility doesn't work

I have a asp.net mvc 4 web application. and I use MvcSiteMapProvider to make my menu. I set visibility attribute at mvcSiteMapNode. like :
0
votes
1 answer

How to create a new model?

I wish I could do the following: @Html.MvcSiteMap().PageMenu() instead of @Html.MvcSiteMap().Menu("MenuBtnGroup"). Mainly because of the filters. I wish that a certain link to appear only on the page or sitemap and not in the main application…
ridermansb
  • 10,779
  • 24
  • 115
  • 226