0

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?

1

Using 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"}
| improve this answer | |
0

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}

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.