12

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.

j0k
  • 22,600
  • 28
  • 79
  • 90
Julien G
  • 415
  • 1
  • 5
  • 20

1 Answers1

18

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

Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133