LiipThemeBundle icon indicating copy to clipboard operation
LiipThemeBundle copied to clipboard

Introducing parent/child themes

Open ahilles107 opened this issue 10 years ago • 4 comments

What do you think about idea of declaring parent theme for theme and parameter parent_theme in path_patterns ? This would allow for us implement themes updating and keeping customer/user theme changes not removed.

Something like:

themes: 
  theme_1: ~
  theme_2: ~
  theme_3: 
    parent: theme_1

ahilles107 avatar Jun 02 '15 16:06 ahilles107

@lsmith77 - what do You think?

ahilles107 avatar Jun 03 '15 17:06 ahilles107

should't twig inheritance be sufficient?

lsmith77 avatar Jun 04 '15 09:06 lsmith77

I think using theme cascading order could be used here. It would be nice if there was a way to change the patterns based on the current theme selected so you could add base themes to the cascade order based on the active theme..

Perhaps the FileLocator could be changed to allow changing the patterns and then some listener to update the cascade order based on the current theme?

wizhippo avatar Jun 04 '15 13:06 wizhippo

@wizhippo I my company we've have quite complicated template inheritance, and we've achieved that using path_patterns will all paths.

oleg-andreyev avatar Jan 04 '18 21:01 oleg-andreyev