In a previous post I talked about the development of a theme manager. Talking
with Demian he posted a link to VuFind theme system where he uses a specific
folder that holds the views for every module view instead of holding the theme
files for a specific module inside that module. I'm trying to make the system
as flexible as possible and was worried about posible collisions and have been
reading more and more code... now I've gotten to a point I think I understand a
little better how views work, but I guess I've gone a little mad, so I wanted
to check with someone.
Right now I think the view is loaded through a RouteMatch, that is, if I've got
a static route called 'assets' and I call a controller in that route the
resulting template will be 'routename/controllername/actionname' for example
'assets/css/index.phtml' (Calling the 'assets' route, 'css' controller, 'index'
action. Is that correct? If this is the way it works there would be not much of
a diference if the views are stored outside or inside the module.
This takes me to a second question: can I set a hook to an event when the
module has loaded the template_path_stack configuration? My goal here would be
to check if a module has a module-specific theme folder, and, if it does,
override the template_path_stack with the theme folder. I know I could do this
creating an abstract class or a new Feature for the module, but if possible I
would like to make it as seamless as possible... else I'll add a
getThemeFolder() in a Feature.
Thanks