Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BreadCrumb trail MVC3 and Razor

Anyone have an example of how to create a breadcrumb trail using the latest MVC3 release and razor syntax?

like image 753
Paul Avatar asked Dec 14 '10 14:12

Paul


2 Answers

You should be able to achieve this by using the MVC SiteMap Provider: http://mvcsitemap.codeplex.com/. It contains features to create breadcrumb trails, and is documented fairly well (and you can always grab the code and modify it to do exactly what you want.)

like image 63
mkchandler Avatar answered Oct 14 '22 23:10

mkchandler


To get the MvcSitemapProvider working do the following:

In your .sitemap file change:

<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" />

to:

<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0" />
like image 38
Ropstah Avatar answered Oct 15 '22 01:10

Ropstah