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 2726 posts 8320 karma points MVP 4x 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

  • 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