Hi.
I'm trying to process a twig template by using a twig string contained in a YAML string variable. Let's make it a bit more clear with an example:
config/a/b.yaml
c: 'hello '
config/site.yaml
bar: '{{config.a.b.c}},{{foo}}'
templates/page.html.twig
{% set twigobj = grav['twig'] %}
{% set foo = 'world' %}
{% set val = twigobj.processString(config.bar,{foo: foo}) %}
This actually set val to 'hello world'. The main issue is that I need to pass each time an array including the variables (e.g. foo) which are different from the standard ones (e.g. config, site, browser...)
There may be another way to achieve this without passing the in-template variables ?
Your feedback is greatly appreciated!