Search path for fluid template files
I'm currently working on a project where multiple extensions need to share some generic views, as well as be able to overwrite them locally.
I have made a patch for fluid that should not break in BC, but add the option for the TemplateView class to scan multiple extensions for view files.
Simply put I have added an "addExtensionSearchPath" method to TemplateView that appends extensions to a flat array (if it haven't already been added)
I have also changed so the following methods has a new optional argument called "extension" to overwrite the normal behavior of just calling "getControllerExtensionKey"
The protected function expandGenericPathPattern has been updated to iterate the new extensionSearchPaths class property and build search paths like before for each extension.
With the path applied you simple have to do the following in your controller to add a new search path
The search paths is processed First In First Out (FIFO) style, so your current extension always takes precedence over any additional searchable extensions added later in the request cycle.
This patch greatly improves the flexibility of the fluid rendering system, and helps keeping things DRY in your apps.
I have attached my patch to this ticket