I am writing a plugin for a quite complex project realized with Smarty2 (pretty oldscool, yes, it's not my decision). I have to change some templates, but only two or three of hundreds (for example the one which generates the page's navbar). Problem is:
- they dont't have any hooks or variables where I would need some
- I cannot modify them (because I want to keep the whole thing updateable)
But I have access to the $smarty object and can use it's methods such as assign.
Is it somehow possible to filter the template-urls before they get displayed? I have something in my mind like
I found a quite convincing solution by myself
In my $myTemplatePath I hold my versions of every template I want to replace. Case solved.