Bread crumb for multiplenodes

Oct 11, 2010 at 3:28 PM

i want to display the breadCrumb like

DashBoard>StarRating>Search>Show>ShowTranslation

and i am getting the breadcrumb.

but if i click on "Show" link i should go to Show page by passing an id to controller..but i unable to pass id in view method(asp.net mvc)

 

<mvcSiteMapNode title="$resources:SiteMapResource,StarRatingTitle"
               url="/CMS/StarRating/Search"
               controller="StarRating">
      <mvcSiteMapNode title="$resources:SiteMapResource,SearchTitle"
              url="/CMS/StarRating/Search/"
              controller="StarRating"
              action="Search">
        <mvcSiteMapNode title="$resources:SiteMapResource,CreateTitle"
              url="/CMS/StarRating/Create"
              controller="StarRating"
              action="Create">
        </mvcSiteMapNode>

        <mvcSiteMapNode title="$resources:SiteMapResource,ShowTitle"
                        url="/CMS/StarRating/Show/"
                        controller="StarRating"
                        action="Show"
                        isDynamic="true"
                        dynamicParameters="Id">
       
        <mvcSiteMapNode title="$resources:SiteMapResource,ShowTranslationTitle"
                        url="/CMS/StarRating/ShowTranslation/"
                        controller="StarRating"
                        action="ShowTranslation"
                        isDynamic="true"
                        dynamicParameters="Id">
        </mvcSiteMapNode>
</mvcSiteMapNode>
      </mvcSiteMapNode>
    </mvcSiteMapNode>

 

 

can any one give a solution for that?

Coordinator
Oct 12, 2010 at 10:51 AM

Which version are you using? MvcSiteMap 2.0+ does no longer support isDynamic and dynamicParameters.

Next: in your action method for ShowTranslation simply set the SiteMapNode.Current.RouteValues["id"] to the correct ID.

Oct 18, 2010 at 5:09 AM

i am using MvcSitemap2.0 and iam using web.sitemap file and i am storing all the keys in resource file

Coordinator
Oct 25, 2010 at 1:22 PM

In your action method for ShowTranslation simply set the SiteMapNode.Current.RouteValues["id"] to the correct ID.