Culture change breaks Children

Feb 2, 2011 at 6:01 PM

I've got the dynamic node providers fully functional now.  I can browse the entire site properly and moving up and down in the site map works properly.
All children are in the correct location and with the correct resource lookups.

Starting with any culture allows the Site Map to work perfectly within that culture (ie browse to French homepage, entire site map works perfectly) but 
once I move to another culture, all children are reported as the first element every time.

So moving to English, URL would list /en/Equip/Loading/Trackless/456 however the Site map would say I'm on /en/Equip/Loading/Track/1
It's always the first child of each level.  Moving back to the French Culture returns everything to functional.

I read in earlier Discussions there were problems with Culture, but it sounded like those issues were resolved.
Any thoughts? 

Feb 4, 2011 at 10:36 AM

Can you post your sitemap?

Feb 4, 2011 at 1:00 PM

Here's the Sitemap

<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="" enableLocalization="true">
    <mvcSiteMapNode title="$Resources:Strings,NavEquipmentLoading" controller="Loading" action="Index">
	<mvcSiteMapNode action="Type" dynamicNodeProvider="nvpMVC.Areas.Equipment.Code.LoadingDynamicNodeProvider, nvpMVC">
		<mvcSiteMapNode action="Details" dynamicNodeProvider="nvpMVC.Areas.Equipment.Code.LoadingDetailsDynamicNodeProvider, nvpMVC" visibility="SiteMapPathHelper,!*"/>

The dynamic providers:
foreach (var item in load)
	DynamicNode node = new DynamicNode("Loading_"+item.path, item.resource);
	node.Key = "Loading_" + item.path;
	node.RouteValues.Add("Type", item.path);
	yield return node;								
foreach (var item in load)
	DynamicNode node = new DynamicNode();				
	node.Title = + " - " + item.Aname;
	node.ParentKey = "Loading_" + ((LoadingType)item.type).ToString();
	node.RouteValues.Add("Type", ((LoadingType)item.type).ToString());
	node.RouteValues.Add("id", item.ID);
	yield return node;
I found that in the DetailsProvider I needed to add the two RouteValues or the children wouldn't show up correctly in any situation.
Node Titles are Resource names to handle the different languages.
LoadingType is an enum for translating DB values. 
Feb 8, 2011 at 7:15 PM

I've noticed now that if I disable the visibility filters, the navigation menu displays the sub entries in the correct location and order.


However, when I enable the visibility filter (to remove the numeric entries, and just display them in the breadcrumbs) the breadcrumb values are incorrect.
Is there a significant difference between Models.MenuHelperModel and Models.SiteMapPathHelperModel?

Feb 14, 2011 at 9:16 AM

Menuhelper has more options, but the main code is almost identical.