Skip to content

No Results #11

@b3nhartl3y

Description

@b3nhartl3y

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions