Search_fields icon indicating copy to clipboard operation
Search_fields copied to clipboard

No Results

Open b3nhartl3y opened this issue 9 years ago • 0 comments

Hi mark,

Great addon, thank you for creating it. I'm having a little issue with the {if no_results} tags. I've got:

`{exp:search_fields search:title="{get:search}" channel="country" min_length="3" parse="inward"}

{exp:channel:entries
    channel="country"
    entry_id="{search_results}"
    dynamic="no"
    show_future_entries="yes"
 }

  <a class="country" href="{site_url}country/{url_title}">
           <h2>{title}</h2>
  </a>

 {/exp:channel:entries}

{if no_results}
            <p class="intro">Sorry, no matches were found for &lsquo;<em></em>&rsquo;.</p>
{/if}

{/exp:search_fields}`

But sadly when no results are found I'm not receiving the no results message, just an empty template. Do you have any idea what I'm doing wrong? Your example says to use an embed - is this required for the no results to work?

Kind regards, Ben

b3nhartl3y avatar Jul 23 '15 13:07 b3nhartl3y