Extending bundle templates #752

fabpot opened this Issue Oct 6, 2011 · 3 comments


None yet
4 participants

fabpot commented Oct 6, 2011

We should add somewhere in the docs the template best practices for reusability/extensibility. For instance, when providing a template with many blocks, it is better to create an empty template that just extends the real template to allow the developer to override the empty template in its own app.


ConneXNL commented Jan 17, 2012

I still don't agree this should be the solution. It's almost saying like you can only properly extend a template from an existing bundle if the creator wants you to, and made preparations for that. Creating 2 template files for each lay-out seems very redundant.

All in all I still think there should be a way to target the "overwritten" template.


wouterj commented Jan 17, 2013

@weaverryan this should get labelled with 'Acitonable'


weaverryan commented Jan 18, 2013

We do have a section in the templating chapter called "Three-level Inheritance", which talks about this approach. I'm not sure if we should add more - in then early examples of showing templating inheritance, I don't think we should burden the explanation with extra layers. We do mention in this section that this approach is a best-practice in vendor bundles.

Resource: http://symfony.com/doc/current/book/templating.html#three-level-inheritance

@weaverryan weaverryan closed this Jan 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment