Copied to clipboard

Flag this post as spam?

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


  • Phil Crowe 192 posts 256 karma points
    Sep 22, 2010 @ 11:10
    Phil Crowe
    0

    check if currentPage is

    i want to display an image if the name of the current node is 'create'. I know this should be simple but its refusing to work.

    ive tried:

      <xsl:if test="$currentPage/ancestor-or-self::root//node [@nodeName = 'CREATE']">
        <img src='/images/mosquitocreate_logo.jpg' alt='' />
      </xsl:if>

      <xsl:if test="$currentPage/node[@nodeName = 'CREATE']">
        <img src='/images/mosquitocreate_logo.jpg' alt='' />
      </xsl:if>

      <xsl:if test="$currentPage/node[@nodeName = 'CREATE']">
        <img src='/images/mosquitocreate_logo.jpg' alt='' />
      </xsl:if>

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Sep 22, 2010 @ 11:19
    Chriztian Steinmeier
    1

    Hi Phil - regardless of your Umbraco version, this is the right XPath to use:

    <xsl:if test="$currentPage/@nodeName = 'CREATE'">

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft