-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom variable #1023
Comments
Yes, use "assign" or "capture" to create a custom variable: You can add conditional statements with "if", "unless", or "case" tags: |
Yes that's right but i want to use if else statment in one line, that mean that if 'x' was true show 'A' else show 'B' |
Like this?
|
@callaginn has provided the cleanest option thats currently possible. I think you may also be referring to a ternary operator, sadly Liquid does not have this functionality. |
Is it possible to create custom variable in liquid ?
E.g in {{ x | A | B }} do that if x > 10 show "A" else show "B" and "A" , "B" can change by user
Thank you
The text was updated successfully, but these errors were encountered: