Support extending/including same template in another theme
It would be nice if from the tablet theme, in the file FooBundle:Bar:baz.html.twig you could reference the same template in another theme like desktop. The syntax could be like: desktop:FooBundle:Bar:baz.html.twig.
not sure if the added complexity is worth it. i mean if its not theme specific code, then why put it into a theme?
The benefit is just that you might want to say, for the listing of the homepage for example, I want to override the default template in my theme, but I still would like to extend it to reuse some stuff from it and not duplicate everything. Of course you can make both extend a third one that contains everything, but talking of added complexity.. :)
sure, i can totally see a need for this, just not sure if we should add this, especially at the risk of coming up with a format that eventually could become incompatible. anyway, if there is a PR that doesn't turn the current code into a too complex mess, then i guess we can add it.
I would be interested by this PR too.
me too!
+1
ping
For info, I found a way to do it directly :
- in your theme, add a symlink to your «parent» theme :
ln -s ../material parent - in your template, set parent with it path
{% extends "WallabagCoreBundle::parent/layout.html.twig" %}