Copied to clipboard

Flag this post as spam?

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


  • manwood 87 posts 109 karma points
    Mar 29, 2010 @ 16:36
    manwood
    0

    How can I trim a string returned from a node in XLST?

    Hi

    I need to take the name of an attribute and just display its first letter. In C# I would use substring - how can I do it with Umbraco?

     

    thanks

  • dandrayne 1138 posts 2262 karma points
    Mar 29, 2010 @ 16:41
    dandrayne
    1

    substring!  Try

    <xsl:value-of select="substring($string,1,1)" />

    More examples here -> http://www.w3schools.com/Xpath/xpath_functions.asp

    Dan

  • manwood 87 posts 109 karma points
    Mar 29, 2010 @ 16:47
    manwood
    0

    Thanks, much appreciated!

  • 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