Copied to clipboard

Flag this post as spam?

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


  • Jukka-Pekka Keisala 75 posts 179 karma points
    Dec 20, 2009 @ 15:59
    Jukka-Pekka Keisala
    0

    Howto get first available string

    Is there a extension in the API that would give me first available string? 

    I would like to make simpler call for

    <xsl:choose>
    <xsl:when test="data[@alias='menuTitle'] != ''">
    <xsl:value-of select="data[@alias='menuTitle']">
    </xsl:when>
    <xsl:when test="data[@alias='title'] != ''">
    <xsl:value-of select="data[@alias='title']">
    </xsl:when>
    <xsl:otherwise>
    something else
    </xsl:otherwise>
    </xsl:choose>

     

     

     

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Dec 20, 2009 @ 16:43
  • Jukka-Pekka Keisala 75 posts 179 karma points
    Dec 20, 2009 @ 20:52
    Jukka-Pekka Keisala
    0

    Sorry, I was not emphasizing in my question that I would like to do this in XSLT file. Any way to call this parameter chaining in XSLT?

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Dec 21, 2009 @ 09:11
    Dirk De Grave
    0

    You don't have to (and you can't), use it as explained in the specified article (sequence is important) and add a new parameter to your macro to pass it on to your xslt. Declare a new parameter in your xslt using <xsl:parameter> and output it using <xsl:value-of>

     

    Cheers,

    /Dirk

     

  • 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