Reputation: 3419
I have two template files. One is a twig template and another is a php template file. Rendering both directly from the controller works, but when I want to render de php template inside the twig template using the {% include 'mytemplate.html.php' %}
but then Symfony uses Twig to parse the template, not the php template engine.
How do I tell Twig to render the template file as a php template instead of a Twig template?
Upvotes: 2
Views: 979
Reputation: 5523
You'll have to write an extension for Twig. The extension could provide function which will take PHP template name as an argument and will render it. Why are you using two different templating engines?
Upvotes: 3