Copied to clipboard

Flag this post as spam?

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


  • Kristian Sørensen 22 posts 42 karma points
    Dec 14, 2010 @ 15:05
    Kristian Sørensen
    0

    Page Title

    I would like to make some different types of titles depending on where we are on the site.

    I have made a macro with the name pagetitle, at it gets called.

    It looks like this:

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:template match="/">

    </xsl:template>

    </xsl:stylesheet>

    But If I insert something like this: <xsl:value-of select="@nodeType"/>, it dont get printed out. What do i do wrong?

     

  • Jeff Grine 149 posts 189 karma points
    Dec 14, 2010 @ 15:23
    Jeff Grine
    0

    Use $currentPage/@nodeType.

  • Rich Green 2246 posts 4008 karma points
    Dec 14, 2010 @ 15:24
    Rich Green
    0

    Hi Kristian,

    You need to include the currentPage variable, like this

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

    Rich

  • Magnus Eriksson 122 posts 362 karma points
    Dec 14, 2010 @ 15:26
    Magnus Eriksson
    0

    Where's your currentPage?:

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

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

    </xsl:template>

    </xsl:stylesheet>

    Regards,
    Magnus

Please Sign in or register to post replies

Write your reply to:

Draft