pikim
January 14, 2023, 10:53pm
1
When I have a process like
process:
- save:
filename: feedback.txt
body: "{% include 'forms/data.txt.twig' %}"
operation: add
in a form: is it possible to retrieve and use the settings of a specific plugin inside forms/data.txt.twig
? How?
@pikim , What have you tried sofar?
pikim
January 15, 2023, 9:13am
3
@anon76427325
E.g. {% set feature_enabled = config.plugins.name.feature %}
in the first line of the twig and then use feature_enabled
inside the script.
@pikim , And then what happened?
pikim
January 15, 2023, 12:59pm
5
@anon76427325
Regardless of whether the boolean config.plugins.name.feature
is true
or false
, feature_enabled
is always null
.
pikim
January 15, 2023, 2:59pm
7
@anon76427325
Thanks! That solved the issue. I’m using {% set feature_enabled = context.config.plugins.name.feature %}
inside the macro now.