Check for no search results
phil88 - January 11, 2008 - 20:23
| Project: | Views Fast Search |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
How is it possible to show the user that no results were found ? Currently, is shows a blank page, no results.
Thanks for the help,
Phil

#1
Go to Administer / Site building / views.
Select 'edit' views_fastsearch.
Under page you will found a option 'empty text'.
This text will only be displayed if a view returns no nodes or in this case no search result!
alex
#2
Oups, I shouldn't have close this...
The problem of this method is that the "no results" message is displayed as soon as the view shows up, while no search has yet been made...
Any workaround?
#3
#4
@doc2, I presume that you're referring to a standard view with an exposed filter, and that the "no results" message displays on the view page before any exposed filter options have been submitted. I haven't setup a test case for this, but don't think that I've seen this problem before. Could you please elaborate on exactly what you're doing. What options are you using for the "search" filter in the view.
#5
Hi Doug,
This is as simple as what you wrote:
Actually, I get the problem with the default search/fast view cloned with just an added "no result" empty text.
You said:
I don't think this is an isolated case (drupalers, anything to say?!)
Thus, considering the need for a "no result" message in case of "no result" only, that is to say the case for any fastsearch view with a "no result" empty text, is there just a simple view setting to make that I missed?
About
I get the problem both on a cloned default view of fastsearch and on a custom view using the fastsearch view_field. This is independent from my other post. Yet it is still effectively assigned to the 5.x-1.x-dev version.
I'll try the 5.x-2.x-dev version but I don't feel confident as there are no public release notes or any other kind of info about it...
#6
Hello all!
I have this exact problem. Any advance here? Any workaround, please?
José
#7
I work around this by evaluating the URL to see if a search has been performed. In the empty text, change the Input type to PHP and do the following:
<?phpif('/view/url/whenempty' === request_uri()) {
return;
} else { ?>
<p>Your search did not return any results.</p>
<?php } ?>