How do I specify an include to a view path that is a "concatenation". A simple example;
In form.twig;
{% include {path: 'survey.'group]} %}
group is a variable, that is passed in to the view from the controller. The view I am trying to load here is views/survey/example.twig
The twig concatenation operator is ~.
So you should have have something like
{% include 'survey/' ~ group ~ '.html.twig' %}
(or however exactly your concatenation needs to go).
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