Skip to content

Condition in template #77

Answered by sffc
Gianluks90 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Gianluks90! The following should work

- if (category == "X") {
+imageFill(image1)
- } else {
+imageFill(image2)
- }

Note that arbitrary JavaScript code can be put on any line that starts with a -

Hope this helps!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gianluks90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants