Theming: are twig templates overridable?


(Tassoman) #1

Well, I’ve read Theming Guide Themes: Develop - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3 but sadly is explaining only CSS and JS overriding.

Because of IE8 bug about X-UA-Compatible meta tag handling, I’m asked to remove conditional comments in html source before this meta tag either in dashboard.twig and admin.twig file (provided by Morpheus theme plugin).

Would be enough to inherit all Morpheus plugin then extend view methods?

If it’s possible to override twig templates more easily would be good could be better explained in theme guide.

Thank you in advance (:smiley:


(Matthieu Aubry) #2

If it’s possible to override twig templates more easily would be good could be better explained in theme guide.

It is possible, this was added in: Let Themes overwrite templates to allow full customisation within Themes · Issue #5122 · matomo-org/matomo · GitHub

I think it is currently un-documented.


(Tassoman) #3

Well, I got it. I wonder to send a pull request on documentation as soon as possible.
Thank you very much X(


(Matthieu Aubry) #4

Pull request with documentation would be very nice :slight_smile: Maybe could be added to this page? Themes: Develop - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

The source where you could send pull request https://github.com/piwik/developer-documentation/blob/master/docs/theming.md