- This topic has 2 replies, 2 voices, and was last updated 1 year ago by .
-
Topic
-
Hi, I have a Number field, I want to set 3 results that depend on the value of this field:
{% if post.price == 0 %} <p>Free</p> {% elseif post.price > 0 %} <p>{{ post.price }}</p> {% else %} <p>No info</p> {% endif %}
It works with the condition == 0 and > 0 but for the {% else %} (empty or > 0) it always show “Free” (the same to condition == 0).
How do I fix this to show “No info” when the price is != 0 neither > 0?
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.