Skip to content

How to handle variables and string literals as custom tag parameters #448

Answered by harttle
amit777 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @amit777 , I created a tutorial here: https://liquidjs.com/tutorials/parse-parameters.html

Glad to know the above snippet works for your case. Apart from Quoted and Word, Liquid value can also be Number(23) or PropertyAccess(foo.bar), you can make use of tokenizer.readValue() and evalToken() for this.

Hope it helps!

Replies: 9 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@amit777
Comment options

Answer selected by amit777
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #445 on January 22, 2022 14:13.