Search results

Permalink 1 user found helpful
Currently the search results shows the default message 'There were no results found. Please try another keyword or phrase.' when the query $results array is == 0. Now if the search is clicked with no query it just displays a blank area and no default message. How can I adjust the code to display a message if nothing is entered?

 
magpie replied on at Permalink Reply
Managed to solve this one myself...added an else clause on if ($do_search) { in the search view.php to display a no results found if the search box was empty
enlil replied on at Permalink Reply
enlil
excellent! I noticed this recently as well, although I'm using the Search Block Templates add-on. Clicking search with an empty field in the header resulted in a blank "main" area, where results were displayed.

Needless to say when you asked your question I began digging through the template files, as they contain exact code snips from the core search block, and this was the same conclusion I came to!!

Time to make some new templates ;)