문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top