Closed (fixed)
Project:
Module Builder
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2011 at 23:08 UTC
Updated:
5 Apr 2011 at 21:51 UTC
Now that the generation code is all tidied up, it's time to fix templates so you get hook templates specific to your version.
Comments
Comment #1
joachim commentedBig heap change.
Issue #1096828 by joachim: Changed hook templates to be version-specific.
Warning: this breaks some stuff!!
1. hook templates in node_hooks.template are not getting used at all; but then again this was (sort of) broken as these were getting triggered by isset($module_data['hooks']['hook_node_info']) rather than if the user had explicitly requested this hook group. (There is no way for the code at this point to know which group was requested at the moment... see issues starting at #1101972: fix hook groups definition to have an ID - switch to using JSON in the file?, and ultimately deal with this at #1101990: add support for hook group template file.)
2. hook templates in hooks-custom.template are not getting used at all. The plan is to move these to a user folder alongside downloaded hooks, but this will take some reworking of things elsewhere which I don't have time for. Also one for a new issue.
and also:
3. the templates need updating for 7. I've changed the obvious ones, but much more could be done here, including adding new templates. If you have a spare moment, please file a patch, even if it's just for one hook! :D
And finally, see also #1101992: fall back to API files for hook body when there is no template?.