Parentkey Property doesn't work sometimes?

May 6, 2010 at 1:30 PM
Edited May 6, 2010 at 5:44 PM

Problem solved (I think).

 

This topic is ready for deletion.

 

Ty anyway :)

May 26, 2010 at 10:44 AM

how do you resolve it?

 

i have something like this:

 

//Controller parent

 [MvcSiteMapNode(ParentKey = "Home", IsDynamic = false, Key = "parent", Visibility = MvcSiteMapNodeVisibility.InSiteMapPathOnly)]
        public ActionResult parent()
        {
            //Set Parent Node details
            SiteMap.CurrentNode.Title = string.Format("{0}", Resources.SiteMap_UnidadesList);

            ModuloPermissionType pemission = ServiceLocator.Current.GetInstance<ILoggedOnUser>().getModuloPermission("UnidadesLista");

            if (pemission == ModuloPermissionType.error)
                throw new Exception();

            return View(pemission.ToString());
        }

//Controller child

[MvcSiteMapNode(ParentKey = "parent", IsDynamic = true, DynamicParameters = "id", Key = "Single", Visibility = MvcSiteMapNodeVisibility.InSiteMapPathOnly)]
 public ActionResult Single(int id)
        {
            // Set sitemap node title
               SiteMap.CurrentNode.Title = string.Format("{0}",Resources.SiteMap_Single);
           
            return View();
        }

i have more controller action decorated with this attributes and work as is. 

i don't understand why is not working in this situation.