Is it possible to transfer a template to a variable? The question is, I have the index.twig file in it, I need to substitute a piece of html with forms depending on the logic. these forms are stored in a separate file form.twig (as used in other places too) at the moment I use the following way {% if check %} {% include 'form.twig' %} {% endif %}
How can this form.twig file form.twig stored in a form.twig and substituted in the right places without include but simply {{ form }} ?