liip / LiipThemeBundle

Provides theming support for Symfony bundles
MIT License
290 stars 76 forks source link

Allow setting of path_patterns via service #108

Closed wizhippo closed 9 years ago

wizhippo commented 9 years ago

Currently we have a multisite setup and change the theme in an kernel event handler. In this handle I would like to be able to update path_patterns so i can set them fallbacks differently based on the site.

Should I make the liip_theme.file_locator service public and add a public method to allow path_patterns to be changed?

Is this useful to others? Should I create a PR for the change?

oleg-andreyev commented 9 years ago

If you have multisite setup, do you per-site config?

wizhippo commented 9 years ago

I use ezpublish and do have different settings per site. We are working on having a number of base themes and to be able to fall back I need to setup different path_paterns per site as each site may extend a different base theme.

lsmith77 commented 9 years ago

hmm this can lead to quite a tricky debug situation if things go wrong there .. that being said, someone said they would soon donate a profiler panel for the bundle .. this could be used as a basis with this feature request to then also show the current rule that applied to every template load.

oleg-andreyev commented 9 years ago

@wizhippo how about then setup path_patterns in persite config? AFAIK path_patterns will be merged with global config if you have such.

lsmith77 commented 9 years ago

ping

wizhippo commented 9 years ago

We just settled on just one fall back for all sites instead of allowing each site to have a different fall back. Though this feature would be nice we do not need it any more.