Copied to clipboard

Flag this post as spam?

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


  • FarmFreshCode 225 posts 422 karma points
    Jun 09, 2011 @ 19:20
    FarmFreshCode
    0

    umbracoNaviHide inside a For-Each Statement

    Hello Everyone.

    I am trying to add umbracoNaviHide to my for-each statment but I am not having any luck. This is the solution I have tried so far. Nothing I seem to do will hide the other images from being added to the LI

    <div id="banner">
      <ul>
        <xsl:for-each select="umbraco.library:GetXmlNodeById(1853)/NewBanner [string(umbracoNaviHide) != '1'] ">
          
          <li>
            <a href="{umbraco.library:NiceUrl(bannerURL)}"><img src="{bannerImage}" width="202" height="204" border="0" /></a>
          </li>
        
        </xsl:for-each>
      </ul>
    </div>

    I have also tried:

    <xsl:for-each select="umbraco.library:GetXmlNodeById(1853)/NewBanner [@isDoc and string(umbracoNaviHide) != '1']

    I am using Umbraco 4.7 and would appreciate any help on this.

  • Tommy Poulsen 514 posts 708 karma points
    Jun 09, 2011 @ 19:24
    Tommy Poulsen
    2

    just to check - your NewBanner node doctype does contain the umbracoNaviHide exactly cased and spelled like that (and the newBanner node has the checkbox checked)?

  • FarmFreshCode 225 posts 422 karma points
    Jun 09, 2011 @ 19:31
    FarmFreshCode
    0

    Yeah, can't balme you for asking.. but yeah.. I've checked it over and over.. copied and pasted it in there.. umbracoNaviHide... I have added 4 banners and checked the box off on 2 of them.. so I should only be showing 2 in the UL but all 4 always show up

  • Kim Andersen 1447 posts 2197 karma points MVP
    Jun 09, 2011 @ 19:48
    Kim Andersen
    2

    HI there

    Could you try to check the node's XML to make sure that the umbracoNaviHide is correctly set to 1. Try posting the returned XML from this snippet:

    <textarea>
    <xsl:copy-of select="umbraco.library:GetXmlNodeById('1853')" />
    </textarea>

    /Kim A

  • FarmFreshCode 225 posts 422 karma points
    Jun 09, 2011 @ 22:17
    FarmFreshCode
    0

    @Kim Andersen Ok... that helped me out... I had missed an "i" in the alias when I first created doctype... even though I had gone back and fixed that error it never carried over to the XML for some reason.. So once I deleted the property and re-created it... everything seems to be working fine now..

    I'll have to keep that trick in mind for the future.. Thanks to Tommy Poulsen too for helping me out too!

  • Kim Andersen 1447 posts 2197 karma points MVP
    Jun 11, 2011 @ 18:07
    Kim Andersen
    0

    Great to hear!

    Actully you probably just needed to republish the nodes after renaming the property alias. But anyway, I'm glad things works now :)

    /Kim A

  • 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