Copied to clipboard

Flag this post as spam?

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


  • Amir Khan 1287 posts 2744 karma points
    Jan 05, 2011 @ 17:59
    Amir Khan
    0

    something like "xsl:else"

    I'm trying to change a macros content for the children of one node but leave it the same for every other page on the site, the macro appears in the header of the master template.

    Is it possible to do something like:

    <xsl:if test="$currentPage/ancestor::node/@id = 1134">
        hello!
    </xsl:if>

    <xsl:else>
    Goodbye!
    </xsl:else>

    I'm totally confused as to how to approach this situation.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jan 05, 2011 @ 18:07
    Tom Fulton
    2

    You can use xsl:choose to do this:

    <xsl:choose>
    <xsl:when test="$currentPage/ancestor::node/@id = 1134">
    hello!
    </xsl:when>
    <xsl:otherwise>
    Goodbye!
    </xsl:otherwise>
    </xsl:choose>
  • Amir Khan 1287 posts 2744 karma points
    Jan 05, 2011 @ 18:30
    Amir Khan
    0

    Perfect! Thank you!

Please Sign in or register to post replies

Write your reply to:

Draft