Copied to clipboard

Flag this post as spam?

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


  • Rocoeh 65 posts 86 karma points
    Sep 05, 2012 @ 12:03
    Rocoeh
    0

    Excuding a single node for dropdown

     I want to hide the subnav where UmbracoNaviHide is set to true and either the name is "Gallery" or the id which is 1599 in this case

    var currentPage = Model;
      @currentPage.Id;

    foreach (var item in @Model.AncestorOrSelf(2).Children.Where("UmbracoNaviHide!=true")  && currentPage.Id !=1599 ) {

    //output the html here

    }

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 06, 2012 @ 17:58
    Tom Fulton
    0

    Hi,

    Not tested, but you might try a Where statement like this:

    .Where("Visible && Id != @0 && NodeTypeAlias != @1", 1599, "Gallery")

    -Tom

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies