When using Low Variables as one would use embeds to include a block of code, is it possible to pass a variable into that code?
For instance,
{lv_mysnippet foo="bar"}
So that I can used the value of foo within the low variable?
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityUsing preload-replace vars is possible, but the vars need to have early parsing enabled for it to work.
If you're using the Textarea var type, you can also use Tag syntax (rather than the Variable syntax) and use the preparse:my_var="value"
parameters, eg:
{exp:low_variables:single var="my_textarea_var" preparse:myvar="foo"}
I've realised that I can simply use {preload_replace}
{preload_replace myvar="foo"}
{lv_mysnippet}
This lets me use the value of myvar within {lv_mysnippet}