Is there an include_partial equivalent in Twig (symfony 2.0)?
Question
I really like to use partial templates in my symfony 1.4 projets and I was wondering if there is something like that with Twig in symfony 2.0.
It's way more clear and reusable to have something like that
<?php include_partial('forum/message', array('message'=>$message)); ?>
Rathen than a big portion of php/html code.
Solution
Yes. It's called include
in Twig. Details are in the docs.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow