Copied to clipboard

Flag this post as spam?

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


  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Aug 26, 2010 @ 14:17
    Jeroen Breuer
    0

    Querystring value in attribute with XSLT

    Hello,

    A colleague of mine has an XSLT question and I don't know the answer so maybe someone here does :).

    We got the following piece of XSLT:

    <xsl:with-param name="radioValidation" select='"ChangeCritSurface(&#39;vloer&#39;)"' />

    This outputs the following html:

    onclick="ChangeCritSurface('vloer')" 

    Now we want to have the following output:

    onclick="ChangeCritSurface('vloer', 'waardeUitVorigeRadioButton', 'waardeUitVorigeVorigeRadioButton')" 

    The second and third values need to be from a querystring using umbraco.library:RequestQueryString('page'). How can we do this because the values need to come from a querystring and needs to be in quotes. Somehow I couldn't figure it out.

    Thanks.

    Jeroen

  • Dan 1250 posts 3747 karma points admin c-trib
    Aug 26, 2010 @ 14:31
    Dan
    1

    Hi Jeroen,

    Set up your querystring values as variables:

    <xsl:variable name="value1" select="umbraco.library:RequestQueryString('value1')"/>
    <xsl:variable name="value2" select="umbraco.library:RequestQueryString('value2')"/>

    Then use these in your XSLT like this:

    onclick="ChangeCritSurface('vloer', '{$value1}', '{$value2}')" 

    Any good?

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Aug 26, 2010 @ 16:35
    Jeroen Breuer
    0

    Thanks Dan that's a good solution! We tried doing the umbraco.library:RequestQueryString('value1') in the select (everyting on a single line) of the xsl:with-param, but we couldn't get that to work.

    Jeroen

  • 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