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.

Was it helpful?

Solution

Yes. It's called include in Twig. Details are in the docs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top