1
Vote

Breadcrumb levels (over 2) not displayed correctly

description

I am using MvcSiteMapProvider and it shows just 2 levels of bread instead of 3 or 4 sometime.

Instead of: Categories > List > item1
Shows just: List > item1

This is my Mvc.sitemap:

<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0"
        xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0 MvcSiteMapSchema.xsd"
        enableLocalization="true">
<mvcSiteMapNode title="$resources:mvc.sitemap,menu_Home" controller="Home" action="Index" visibility="InSiteMapPathOnly" changeFrequency="Always">
<mvcSiteMapNode title="$resources:mvc.sitemap,menu_Categories" controller="Category" action="Categories">
        <mvcSiteMapNode title="$resources:mvc.sitemap,menu_List" controller="Category" action="Index">
            <mvcSiteMapNode title="$resources:mvc.sitemap,menu_item1" controller="Category" action="Action1" />
            <mvcSiteMapNode title="$resources:mvc.sitemap,menu_item2" controller="Category" action="Action2"/>
        </mvcSiteMapNode>
</mvcSiteMapNode>
</mvcSiteMap>

comments

jj09 wrote Nov 23, 2012 at 5:30 PM

It only occurs when I have the same pair Controller/Action in two nodes (one in another)
Eg.:
<mvcSiteMapNode title="$resources:mvc.sitemap,menu_Categories" controller="Category" action="Categories">
<mvcSiteMapNode title="$resources:mvc.sitemap,menu_List" controller="Category" action="Categories">
<mvcSiteMapNode title="$resources:mvc.sitemap,menu_item1" controller="Category" action="Action1" />
<mvcSiteMapNode title="$resources:mvc.sitemap,menu_item2" controller="Category" action="Action2"/>
</mvcSiteMapNode>
</mvcSiteMapNode>