views:

63

answers:

2

I've got the following structure to a site:

/Products/
    /Details/{ID}
       /Details/Edit/{ID}

It's slightly different from the usual /products/edit and /products/details approach most sites have, because the edit link is only available on the Details page.

My problem is ASP.NET MVCSitemap doesn't maintain the keys in the sitemap. So when I'm on the edit page it produce a crumbtrail of:

<a href="/Products">Products</a>
<a href="/Products/Details">Details</a>
<a href="/Products/Details/Edit/{id}">Edit</a>

instead of the HTML I'm expecting:

<a href="/Products">Products</a>
<a href="/Products/{id}/Details">Details</a>
<a href="/Products/Details/Edit/{id}">Edit</a>

Notice that the 2nd link has no key in it. Is there a simple way to fix this?

A: 

I found out myself that this is an issue with the current version (1.0.1) - as the example project doesn't render the crumbtrail properly for parent links with Ids. More details here.

Chris S
A: 

New version 2.1.0 may fix this issue. Check http://mvcsitemapprovider.com

maartenba