@datamints opened this Pull Request on April 24th 2014

Theme templates can be overridden by placing twig-templates of the same name in plugins/[theme]/templates.
Plugin-templates can be overridden by placing twig-templates of the same name in plugins/[theme]/templates/plugin/[plugin]/

It would be great if this could be included in upcoming piwik versions as it improves theming a lot

@mattab commented on April 25th 2014 Member

Could you explain the use case for this change? What are you trying to achieve?

Ideally it would be nice if you could use only template hooks to theme and "add" content within templates. See for example this commit where I added few generic hooks for themes to "add" content within the pages: c3b6c38e84ecba

@datamints commented on April 28th 2014

We are providing piwik as SaaS solution. To incorporate our corporate design we needed to modify some parts of the dashboard.twig and login.twig templates.
Working with PostEvents in twig would probably be possible in our case, but not as comfortable, as you start coding html-code in your PHP files (or you had to bootstrap twig to load your own template structure, which again is some bit of code).
As twig provides great possibilities for overwriting templates, I think it should also be available in the "themes" feature of piwik (just "adding" some HTML is sometimes not enough).

@mattab commented on May 9th 2014 Member

I've created a ticket for this feature at: http://dev.piwik.org/trac/ticket/5122

it's useful and it makes sense. Thanks for the suggestion and pull request!

@mattab commented on June 7th 2014 Member

@datamints a Piwik user was trying out your feature, and found an infinite loop. Maybe you could give him a hand? the ticket in issue tracker is: http://dev.piwik.org/trac/ticket/5305

This Pull Request was closed on May 9th 2014
Powered by GitHub Issue Mirror