MvcSiteMapProvider
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.
Upgrading from v3 to v4
If you are upgrading from v3 to v4 see the upgrade guide.
What can it be used for?
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.
Documentation
See the documentation
Get it on NuGet!
Stable releases:
Install-Package MvcSiteMapProvider.MVC5
- or -
Install-Package MvcSiteMapProvider.MVC4
- or -
Install-Package MvcSiteMapProvider.MVC3
- or -
Install-Package MvcSiteMapProvider.MVC2
- or -
Use one of our dependency injection packages.
Prefer continuous integration builds?
Install-Package MvcSiteMapProvider.MVC5 -IncludePrerelease -Source http://www.myget.org/F/mvcsitemapprovider
- or -
Install-Package MvcSiteMapProvider.MVC4 -IncludePrerelease -Source http://www.myget.org/F/mvcsitemapprovider
- or -
Install-Package MvcSiteMapProvider.MVC3 -IncludePrerelease -Source http://www.myget.org/F/mvcsitemapprovider
- or -
Install-Package MvcSiteMapProvider.MVC2 -IncludePrerelease -Source http://www.myget.org/F/mvcsitemapprovider
License
Building the source
After cloning the repository, run build.cmd.
MvcSiteMapProvider used the psake build engine to build the project. Psake is a Powershell based engine and if it is the first time you execute powershell scripts on your system you may need to allow script execution by running the following command as adminstrator:
Set-ExecutionPolicy RemoteSigned
Contributions
Please read our Contributing to MvcSiteMapProvider guide.
Acknowledgements
The downloads page features an example application. The example code is all based on the excellent ASP.NET MVC Music Store sample application by Jon Galloway.
Unofficial Documentation and Resources
Other places around the web have some documentation that is helpful for getting started and finding answers that are not found here.
Tutorials and Demos
Version 4.x
- MvcSiteMapProvider 4.0 - A Test Drive
- MvcSiteMapProvider 4.0 - SEO Features Tutorial
- How to Make MvcSiteMapProvider Remember a Userβs Position
- MvcSiteMapProvider 4.0 - Cache Configuration
- MvcSiteMapProvider 4.0 - Extending the Cache
- MvcSiteMapProvider 4.0 - Unit Testing with the SiteMaps Static Methods
- Debugging an MvcSiteMapProvider Configuration
- Converting from C# to Vb MvcSiteMapProvider
- ASP.NET MVC Menu using Site Map Provider & Bootstrap 3 Navbar
- ASP.NET MVC SiteMapPath using Site Map Provider & Bootstrap Breadcrumbs
- NightOwl888's MvcSiteMapProvider Demos - Filter for "MvcSiteMapProvider" to see the most relevant.
Version 3.x
- MvcSiteMapProvider Tutorial and Examples
- MvcSiteMapProvider Tutorial 2 - Breadcrumbs
- Getting Started with MvcSiteMapProvider
- Inside the MvcSiteMapProvider - Part 1
- Inside the MvcSiteMapProvider - Part 2: Dynamic node providers
- Inside the MvcSiteMapProvider - Part 3: The ISiteMapVisibilityProvider
- Inside the MvcSiteMapProvider - Part 4: The IAclModule
- Inside the MvcSiteMapProvider - Part 5: The ISiteMapNodeUrlResolver
- Styling MvcSiteMapProvider with CSS
- Using MvcSiteMapProvider with Twitter Bootstrap
- ASP.NET MVC Menu using Site Map Provider & Bootstrap Navbar