Copied to clipboard

Flag this post as spam?

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


  • Lloyd 15 posts 35 karma points
    Oct 25, 2011 @ 06:23
    Lloyd
    0

    Request & RequestQueryString not returning anything

    I'm using the blog application in Umbraco 4.5.2. In my xslt I'm trying to use Request to get the filterBy to return a list of 'tagged' posts but it's always coming back as empty. I'm trying to print the value out to the screen by doing this:

          <xsl:value-of select="umbraco.library:RequestQueryString('filterBy')"/>

    Or

          <xsl:value-of select="umbraco.library:RequestServerVariables('QUERY_STRING')"/>

    I did the above to see if it was my code for passing it into a variable (which it wasn't). My code to get the filterBy into a variable is as follows:

      <xsl:variable name="filter">
        <xsl:choose>
          <xsl:when test="string-length(umbraco.library:RequestQueryString('filterBy')) &gt; 0">
            <xsl:value-of select="umbraco.library:RequestQueryString('filterBy')"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="''"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:variable>

    Non of the above are working and I have no idea why. Stating the obvious, filterBy has a value in the Query String: http://test.ecargo.co.nz/news.aspx#?filterby=Our%20Customers :)

    What is going wrong?

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Oct 25, 2011 @ 08:40
    Chriztian Steinmeier
    0

    Hi Lloyd,

    You're doing everything right - but the QueryString IS actually empty :-)

    Everything after the hash (#) is, well, the "hash" of a URL - so that's why.

    /Chriztian

  • Lloyd 15 posts 35 karma points
    Oct 25, 2011 @ 22:39
    Lloyd
    0

    lol, of course [slaps himself on the head]!

    Thanks for pointing that out.

Please Sign in or register to post replies

Write your reply to:

Draft