2 Replies Latest reply on Dec 1, 2014 7:29 AM by CarlosYuste

    Using liquid for custom message if search is empty

    Machinette Level 3

      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  %}