Copied to clipboard

Flag this post as spam?

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


  • Bas Wensveen 54 posts 75 karma points
    Nov 11, 2009 @ 21:44
    Bas Wensveen
    0

    How to create a query string with multiple parameters in XSLT

    Dear all,

     

    I'm new to Umbraco and XSLT. I would like to create a query string with multiple parameters. Could anyone help me with some sample code?

     

     

    Kind regards,

     

     

     

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Nov 11, 2009 @ 21:52
    Chriztian Steinmeier
    1

    A little difficult to know exactly what you mean, but one thing that almost always trips people up, is the basic XML rule of having to escape ampersand characters - to build a simple link from some variables or parameters, you could do this:

    <xsl:variable name="idFromSomewhere" select="1280" />
    <xsl:param name="pageFromElsewhere" select="'contacts'" />
    
    <a href="http://www.server.com/page?id={$idFromSomewhere}&amp;page={$pageFromElsewhere}">Click Me!</a>

    If that's not enough to get you started, feel free to ask again.

    /Chriztian

  • Bas Wensveen 54 posts 75 karma points
    Nov 11, 2009 @ 21:56
    Bas Wensveen
    1

    That is exactly what I needed!

     

    Thanks

  • bob baty-barr 1180 posts 1294 karma points MVP
    Nov 11, 2009 @ 22:06
    bob baty-barr
    0

    @Bas, plus one karma for marking the solution!

Please Sign in or register to post replies

Write your reply to:

Draft