Copied to clipboard

Flag this post as spam?

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


  • Dan 1250 posts 3747 karma points admin c-trib
    Jan 29, 2010 @ 14:51
    Dan
    0

    Stupidly basic xslt question

    Just as I think I'm getting the hang of xslt, being able to traverse nodes etc, I'm stuck with something mega mega basic.

    How do I output the current node name (I know I could do this with an umbraco field in the template but it's more complicated than that)?  I've done the following but it returns nothing:

    <xsl:variable name="pageNode" select="$currentPage/node"/>
    <h2>
        <xsl:value-of select="@nodeName"/>
    </h2>

    Please somebody put me out of my misery!

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 29, 2010 @ 15:01
    Thomas Höhler
    0

    You are at the current node so it has to be:

    <xsl:value-of select="$currentPage/@nodeName" />

    hth, Thomas

  • Dan 1250 posts 3747 karma points admin c-trib
    Jan 29, 2010 @ 15:02
    Dan
    0

    Bingo, thanks Thomas.

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 29, 2010 @ 15:03
    Nik Wahlberg
    0

    You should be able to do

    <xsl:value-of select="$currentPage/@nodeName"/>

    HTH

    -- Nik

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 29, 2010 @ 15:03
    Nik Wahlberg
    0

    way too late...:)

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 29, 2010 @ 15:04
  • 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