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?

2 Answers 2

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"}
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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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