I must be missing something obvious, but, how can I use a single template to serve search results when results are and aren’t found?
I’m building a search form like this, using the no_result_page parameter:
{exp:search:simple_form channel="news|pages" result_page="search/index" search_in="everywhere" no_result_page="search/index"}I tried the following, but, I don’t get any output from within {exp:search:search_results}.
{exp:search:total_results}
{if "{total_results}" != "0"}
{exp:search:search_results}
{title}, etc.
{/exp:search:search_results}
{/if}
{/exp:search:total_results}... if I don’t nest {exp:search_results} within that conditional, I get the ugly “Search Results: Your search did not return any results.” system message.
What am I missing? Surely there’s a conditional I can nest {exp:search:search_results} within that won’t bork the template.