Can you post an example using a custom template?

Feb 4, 2011 at 6:33 PM

It doesn't appear that my modifications to MenuHelperModel.cshtml are being applied.

Feb 8, 2011 at 8:41 AM
Edited Feb 8, 2011 at 8:42 AM

I am having the exact same issue. Even if I set the template string to a junk string [e.g. @Html.MvcSiteMap().Menu("ThisTemplateDoesntExist") ] I don't even get a runtime error. It just displays the menu in a standard <ul>

Anyone out there?

Feb 8, 2011 at 9:53 AM

Just worked it out.

If you get the files using NuGet (as we did), it dumps the template files into /Views/Shared.

To get them working, you need to create a new folder within /Views/Shared/ called "DisplayTemplates"

You then need to move the template files that have been dumped into /Views/Shared into /Views/Shared/DisplayTemplates/

Looks like a great solution but I really had to trawl around to find this out. I'll stick a blog post up about it.

Feb 8, 2011 at 12:44 PM

Good catch!  I noticed that they were in DisplayTemplates for MVC2's latest and not 3 but I just assumed it was by design.

Feb 14, 2011 at 8:17 AM

The previous NuGet package had a faulty path in there, /Views/Shared/DisplayTemplates/* is the right path.

Aug 2, 2011 at 11:15 AM

I have the latest NuGet package so the templates are in the right path for me, yet they're still not being used.  Any other suggestions?

Aug 26, 2011 at 12:41 PM
Edited Aug 26, 2011 at 12:42 PM

MvcSiteMapProvider will use the ASCX file if it is there. Rename or delete the ASCX file and notice that the provider uses the razor (CSHTML) file.