While I love the concept of template hooks, there are some concerns that I would really like to have addressed:
1. I would like a way to "expose" which templates are being modified by template hooks, this might sound simple now, but after I start installing dozens of plugins, finding out which addon modifies what could turn into a nightmare, really fast, really soon. I could always go and check what listeners are being applied, then check that listener class individually ... This sounds like it could lead to countless hours of debugging
2. Is it possible to modify the template at compilation time, instead of at generation time? Right now it seems that it is modified at runtime, appending or modifying contents, but I would also like to be able to, say, modify the actual template definition. This is a little different in the sense that the hook would be applied once when the add-on is compiled and everytime the templates are recompiled. Could we maybe have both?
3. I feel a little uneasy by the feeling that if there are 100 hooks in templates, and I have a listener, that same listener is called for the 100 hooks.. is that the case? so, for example, if I want to modify a fragment of thread_view, I add a template hook and suddenly that hook is called for every single template on the site everywhere? home - called, members - called, etc - called .. Maybe I am over-obsesive and the "switch ($hookName)" is so unexpensive this is not a problem. Please give me reassurance.