Is it possible to access the current template's variables from within a macro without passing the variable to the macro directly? Thanks.
It's possible to pass all context variables to a macro:
{{ macro(_context) }}
_context
is a special variable, which contains all currently defined variables (by name => value).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With