The code is pretty well commented so that should help you find the relevant portion of the code. To get you started, though, search for the following line in the name="search" template:
<!-- display search box at the bottom of the page (the
search box is always present even if no search was attempted) -->
Just above that line, add the following:
<xsl:if test="$unescapedSearch = ''"> <p id="xsltsearch_summary"> You haven't filled any search argument, please try again. </p> </xsl:if>
Thanks Doug, this was messing up my layout when search was pressed with no terms in it. Ended up with an extra <div> on the page. Works fine now though, thanks :)
Empty search
Is it possible with XSLTSearch to add text when people leave the input field empty?
I tryed to use "<xsl:when test="count($matchedNodes) = 0 or string-length($unescapedSearch)!= 0">" but this doesn't work.
It would be great to show the text "You haven't filled any search argument, please try again".
The code is pretty well commented so that should help you find the relevant portion of the code. To get you started, though, search for the following line in the name="search" template:
Just above that line, add the following:
cheers,
doug.
Thanx! It works perfect.
Thanks Doug, this was messing up my layout when search was pressed with no terms in it. Ended up with an extra <div> on the page. Works fine now though, thanks :)
is working on a reply...