Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Jensen 32 posts 137 karma points
    May 13, 2013 @ 09:44
    Peter Jensen
    0

    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 

     

Please Sign in or register to post replies

Write your reply to:

Draft