Copied to clipboard

Flag this post as spam?

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


  • jing.ling 29 posts 20 karma points
    Apr 29, 2009 @ 05:48
    jing.ling
    0

    How to count all child nodes with 'umbracoNaviHide' = 0 (solved)

    Hi All

    I try to count all children nodes with 'umbracoNaviHide' = 0

    What I wrote is:

    [quote]

    [/quote]

    But it counts all child nodes. How do I add the condition for it?

    Thank you

  • Petr Snobelt 923 posts 1535 karma points
    Apr 29, 2009 @ 08:31
    Petr Snobelt
    0


    select="count($navigationNodes/child::node[string(data [@alias='umbracoNaviHide']) != '1'])" />

    Petr

  • jing.ling 29 posts 20 karma points
    Apr 29, 2009 @ 23:00
    jing.ling
    0

    Thanks Petr. It works fine.

  • Hywel Bromby 33 posts 63 karma points
    Sep 10, 2009 @ 15:50
    Hywel Bromby
    0

    How do you actually set the value of 'umbracoNaviHide' on a page? for eample i dont want my sitemap tobe diplayed in my navigation menu.

  • dandrayne 1138 posts 2262 karma points
    Sep 10, 2009 @ 15:57
    dandrayne
    0

    Add a property to the page of type "true/false" with an alias of umbracoNaviHide, that should do it.

  • Chris Dunsing 18 posts 83 karma points
    Aug 16, 2011 @ 19:06
    Chris Dunsing
    1

    if you are trying to solve this with 4.5 syntax or newer try: 

    select="count($navigationNodes/descendant-or-self::* [string(umbracoNaviHide) != '1'])"

Please Sign in or register to post replies

Write your reply to:

Draft