Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extending/including same template in another theme #11

Open
Seldaek opened this issue Nov 1, 2011 · 8 comments
Open

Support extending/including same template in another theme #11

Seldaek opened this issue Nov 1, 2011 · 8 comments

Comments

@Seldaek
Copy link
Contributor

Seldaek commented Nov 1, 2011

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.

@lsmith77
Copy link
Contributor

lsmith77 commented Nov 1, 2011

not sure if the added complexity is worth it. i mean if its not theme specific code, then why put it into a theme?

@Seldaek
Copy link
Contributor Author

Seldaek commented Nov 1, 2011

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.. :)

@lsmith77
Copy link
Contributor

lsmith77 commented Nov 1, 2011

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.

@COil
Copy link
Contributor

COil commented Feb 28, 2012

I would be interested by this PR too.

@skydiablo
Copy link

me too!

@oleg-andreyev
Copy link
Contributor

+1

@lsmith77
Copy link
Contributor

ping

@vibby
Copy link

vibby commented Oct 11, 2017

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" %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants