Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I downloaded the xsltsearch package and to perform multi word searches you need to use double quotes before and after the term.
Is there a way I can concatinate quotes to the term?
don't know if this helps, but if it's in xslt you can use the concat function:
concat('"',$yoursearchterm, '"')
Hrmm.. I feel silly not being able to resolve this but i'm a beginner. Xslt won't allow me to save this..I'm sure there's a syntax error
<xsl:variable name="search"> <xsl:value-of select="concat('"',$search, '"')"/> <xsl:choose> <!-- form field value, if present --> <xsl:when test="string(umbraco.library:RequestForm('search')) != ''"> <xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestForm('search')))" /> </xsl:when> <!-- querystring value, if present --> <xsl:when test="string(umbraco.library:RequestQueryString('search')) != ''"> <xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestQueryString('search')))" /> </xsl:when> <!-- no value --> <xsl:otherwise> <xsl:value-of select="''"/> </xsl:otherwise> </xsl:choose> </xsl:variable>
Try this:
<xsl:variable name="search">" <xsl:choose> <!-- form field value, if present --> <xsl:when test="string(umbraco.library:RequestForm('search')) != ''"> <xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestForm('search')))" /> </xsl:when> <!-- querystring value, if present --> <xsl:when test="string(umbraco.library:RequestQueryString('search')) != ''"> <xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestQueryString('search')))" /> </xsl:when> <!-- no value --> <xsl:otherwise> <xsl:value-of select="''"/> </xsl:otherwise> </xsl:choose>" </xsl:variable>
ps. i haven't thought about what implications this would have on the search results
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
concat quotes to search term in xsltsearch
I downloaded the xsltsearch package and to perform multi word searches you need to use double quotes before and after the term.
Is there a way I can concatinate quotes to the term?
don't know if this helps, but if it's in xslt you can use the concat function:
Hrmm.. I feel silly not being able to resolve this but i'm a beginner. Xslt won't allow me to save this..I'm sure there's a syntax error
<xsl:variable name="search">
<xsl:value-of select="concat('"',$search, '"')"/>
<xsl:choose>
<!-- form field value, if present -->
<xsl:when test="string(umbraco.library:RequestForm('search')) != ''">
<xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestForm('search')))" />
</xsl:when>
<!-- querystring value, if present -->
<xsl:when test="string(umbraco.library:RequestQueryString('search')) != ''">
<xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestQueryString('search')))" />
</xsl:when>
<!-- no value -->
<xsl:otherwise>
<xsl:value-of select="''"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Try this:
ps. i haven't thought about what implications this would have on the search results
is working on a reply...