Sidebar

startup_tutorial_and_checklist:design_configuration:smarty_template_code_extensions:search_form_display

Display in Search Page Results If No Results

You can choose to display different text in the search page results using the following smarty code:

{if $no_listings}
   there are no search results
{else}
   there are search results so display this
{/if}

{if $no_listings}
   only display if there are NO search results
{/if}

{if not $no_listings}
   only display if there ARE search results
{/if}

You can insert this into the page template attached to the search results page to display something (text/html) if there are search results and different text/html if there are no search results.

Note that by default a very common page template (used across many pages) is attached to the search page. So you may need to create a specific template for use in the search and search results page.

startup_tutorial_and_checklist/design_configuration/smarty_template_code_extensions/search_form_display.txt · Last modified: 2014/09/25 16:55 (external edit)