Copied to clipboard

Flag this post as spam?

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


  • Barry 99 posts 187 karma points
    Sep 14, 2009 @ 23:27
    Barry
    0

    How to display current page's data

    I have an XSLT which I think I may slightly wrong.. it needs to display the current nodes data

     

    <xsl:param name="currentPage"/> <xsl:template match="/"> <h1><xsl:value-of select="@nodeName"/></h1> <xsl:value-of select="umbraco.library:FormatDateTime(data [@alias='eventDate'], 'DDD, DD MMMM YYYY')"/> </xsl:template>

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Sep 14, 2009 @ 23:35
    Thomas Höhler
    0

    You missed the $currentPage at the select:

    <xsl:param name="currentPage"/>

    <xsl:template match="/">
    <h1><xsl:value-of select="$currentPage/@nodeName"/></h1>
    <xsl:value-of select="umbraco.library:FormatDateTime(
    $currentPage/data [@alias='eventDate'], 'DDD, DD MMMM YYYY')"/>

    </xsl:template>

    Thomas

  • dandrayne 1138 posts 2262 karma points
    Sep 14, 2009 @ 23:38
    dandrayne
    0
    <h1><xsl:value-of select="$currentPage/@nodeName"/></h1>
    <xsl:value-of select="umbraco.library:FormatDateTime($currentPage/data [@alias = 'eventDate'], 'd MMMM, yyyy')"/>

    You may only be missing $currentPage/ parameterm, but I'm also not sure about what you're asking of the FormateDateTime (too many commas?) - see here for a reference: http://en.wikibooks.org/wiki/Umbraco/Reference/umbraco.library/FormatDateTime

    Dan

  • dandrayne 1138 posts 2262 karma points
    Sep 14, 2009 @ 23:39
    dandrayne
    0

    Arr, just opened my eyes  - all looks good with the FDT, try putting in currentPage and you should be ok.

Please Sign in or register to post replies

Write your reply to:

Draft