• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Using liquid for custom message if search is empty

Engaged ,
Nov 30, 2014 Nov 30, 2014

Copy link to clipboard

Copied

Hi all,

I am having issues with the proximity search, submited a ticket, got to level 2 but after reading this post Re: How does Proximity Search work I realized that all my fears are true.

Even If support updates bc database with all my records (zip/addresses) I will still get empty searchs when zip doesnt exist or is not indexed n the database.

Since I need to avoid any kind of empty message I think that best option is to display all the webapp items in case there are no results after searching.

Can i use liquid to achive this?

Is there something like this and in case there is what would be the exact sintax: (sorry I need to study a lot of liquid)

{% if search_results.hits_count == 0 %}

     //show all webapp items

{% else %}

         //Show search results

{% endif  %}


Thanks


TOPICS
Web apps

Views

389

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 30, 2014 Nov 30, 2014

Copy link to clipboard

Copied

One more thing, I realize that when using biigger than > o smaller than < code breaks apart... Guess I am doing something wrong...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 01, 2014 Dec 01, 2014

Copy link to clipboard

Copied

LATEST

I am interested in getting deeper information on this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines