0

The code below works, but is too complex, I'd like to simplify it. How can I make the select portion conditional or how can I use a variable in the select?

<xsl:choose>
        <xsl:when test="count(current()/child::* [@isDoc and string(umbracoNaviHide) != '1']) &gt; 0">
          <xsl:for-each select="$currentPage/self::* [@isDoc and string(umbracoNaviHide) != '1']">
            <h3>
              <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/>
              </a>
            </h3>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:for-each select="$currentPage/parent::* [@isDoc and string(umbracoNaviHide) != '1']">
            <h3>
              <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/>
              </a>
            </h3>
          </xsl:for-each>
        </xsl:otherwise>
      </xsl:choose>
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by xml_looser
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.