I have a MVC project and I am implementing a breadcrumb with the MVCSitmapprovider.
My MVC is following Sitemap:
& lt; MvcSiteMapNode title = "index" controller = "index" action = "index" key = "index" & gt; & Lt; MvcSiteMapNode title = "parent" controller = "parent" action = "see" key = "parent" & gt; & Lt; MvcSiteMapNode title = "hair" controller = "hair" action = "view" /> & Lt; / MvcSiteMapNode & gt; & Lt; / MvcSiteMapNode & gt; I've added the _layout view
@ html.mvcSiteMap (). SiteMapPath () When I return to the original item, the parameter needs to be protected in order to get the correct item. To do this, I added the annotation in the View function. SiteMapPreserveRouteData:
[SiteMapPreserveRouteData] Public Function View (Proxy ID) Now, I can navigate my breadcrumbs using
The problem is that it only works with the first item when I change the item, the breadcrumbs disappear ...
Sample: I navigate to the original page 2 - & Gt; Child C1, and when I return to the index and select the parent 1, the parent page of the page does not show the breadcrumb.
If I extract annotation sitemapresarerRoutData, but the breadcrumb is lost then ID ..
Am I worning? some ideas?
Thank you
- topicprop = "text">
The problem is most likely to be your approach, I use SiteMapPreserveRouteData Does not recommend - it is cruel power and more importantly, the approach taken in its design is faulty.
I have created a post which goes deeper in tracking the position of the user. In the sitemap - understanding the information of the post is important in making roti-tromba trails that do not disappear.
No comments:
Post a Comment