-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
- AS A software engineer writing a Liquid template,
- I WANT TO use a ternary operator to assign values for truthy or falsey scenarios,
- SO THAT I can write this in one line instead of five.
- {% if url == "/" %}
- {% assign my_variable = "something" %}
- {% else %}
- {% assign my_variable = "something_else" %}
- {% endif %}
+ {% assign my_variable = url == "/" ? "something" : "something_else" %}There is a huge amount of support for this crucial feature in twelve-year-old issue #236.
pinguluk, halcarleton, bogdanbeniaminb, BaggioGiacomo, CheariX and 5 more
Metadata
Metadata
Assignees
Labels
No labels