I just startede up a new MVC project, and want to make a subnav for the site. but it is giving me a hard time, maybe because i suck at mvc :)
Specs : the menu needs to display the children of a level 2 node, and once navigation to that it needs to display the siblings og that node. But it seems to me that Ancestor or self with a parameter acts defrient from the old xslt days.
the c# code in my controller that is getting the nodes are :
Sub navigation in umbraco 6
Hey all
I just startede up a new MVC project, and want to make a subnav for the site. but it is giving me a hard time, maybe because i suck at mvc :)
Specs : the menu needs to display the children of a level 2 node, and once navigation to that it needs to display the siblings og that node. But it seems to me that Ancestor or self with a parameter acts defrient from the old xslt days.
the c# code in my controller that is getting the nodes are :
list.AddRange(CurrentPage.Level == 3
? CurrentPage.Siblings()
: CurrentPage.Descendants().Where(i => i.Level == 3));
I am adding all the nodes to a list to cast em to navigable items later on.
If someone has a sub nav that works like i describe any bit of code would help me alot :)
Regards Peter
is working on a reply...