Reputation: 44605
I am creating an mvc 4 c# web application for an ecommerce site that has both products, categories but also traditional pages.
The site has a global and local navigation, and a breadcrumb.
To assist with managing the navigation, I am considering using a sitemap provider which can be populated and used to drive the navigation and breadcrumb.
Is there any easy way to do such, using a sitemap, custom populated to manager the navigation and breadcumb of the site. An awareness of where the user is on the site can be achieved from the url. Any examples from other solutions as how they achieve such?
Upvotes: 2
Views: 13766
Reputation: 12253
Look at the nuget package mvc sitemap provider. It does that out the box. Tutorial here http://edspencer.me.uk/2011/02/10/mvc-sitemap-provider-tutorial/
We use it for menus and breadcrumbs for all our MVC sites
Upvotes: 7