2013-01-17 40 views
0

如何將查詢字符串添加到XSLTsearch結果URL?Umbraco XSLTsearch如何將查詢字符串添加到搜索結果URL

當我點擊提交按鈕,我想查詢字符串的URL顯示:

例如/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> 

任何人都可以幫幫我?

乾杯,JV

+0

我已經刪除了表單標籤不熟悉Umbraco XSLTSearch,但爲了獲得查詢參數到URL中通常是你的'

'需要使用['get method'](http://www.w3schools.com/tags/att_form_method.asp)。這對你的情況是可能的,還是抽象出你的XSLT可以控制的東西? – JLRishe

+0

我在我的主模板中設置的表單被設置爲,它在前端的方法是「post」。 – JV10

回答

1

表單需要像:

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

或只是

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

假設你在你的母版