symfony - How can I load templates from subdirectories in Symfony2? -


i wanna replace form widget, created file projectcorebundle:form:fields.html.twig changes ... now, how can create subdirectory in bundle/resources/views/form folder, use this: projectcorebundle:form:admin:fields.html.twig (because use corebundle 'admin' , 'frontend', , separate these form customizations)

you can load templates subdirectories view syntax:

projectcorebundle:form:admin/fields.html.twig 

or

projectcorebundle:form/admin:fields.html.twig 

or

projectcorebundle::form/admin/fields.html.twig 

Comments