JV10
JV10

Reputation: 891

Umbraco XSLTsearch how to add the query string to the search results URL

How can I add the query string to the XSLTsearch results URL?

When I click on the submit button, I would like the query string to display in the URL:

e.g /search-results.aspx?search=red

<xsl:if test="$searchBoxLocation='TOP' or $searchBoxLocation='BOTH'">
  <div class="xsltsearch_form">
    <input name="search" type="text" class="input">
      <xsl:attribute name="value">
        <xsl:value-of select="$unescapedSearch"/>
      </xsl:attribute>
    </input>
    <xsl:text>&nbsp;</xsl:text>
    <input type="submit" class="submit">
      <xsl:attribute name="value">
        <xsl:value-of select="$dictionaryButton-Search"/>
      </xsl:attribute>
    </input>
  </div>
</xsl:if>

Can anyone help me out?

Cheers, JV

Upvotes: 0

Views: 611

Answers (1)

Joan Caron
Joan Caron

Reputation: 1970

your form need to be like:

<form action="?">
    <!--You macro here-->
</form>

or just

<form>
    <!--You macro here-->
</form>

assuming you have deleted the form tag in your masterpage

Upvotes: 1

Related Questions