[development] The new menu system
Gerhard Killesreiter
gerhard at killesreiter.de
Tue Sep 26 15:09:37 UTC 2006
James Walker wrote:
>
> On 26-Sep-06, at 10:50 AM, John VanDyk wrote:
>
>>> At 9:44 AM -0500 9/26/06, John VanDyk wrote:
>>>> this new system gets rid of the $may_cache switch in hook_menu().
>>>> hook_menu is now called only upon module enable/disable and
>>>> admin/menu. this is outstanding. however, we no longer have a place
>>>> to stick our drupal_add_css() and drupal_add_js() type calls.
>>>>
>>>> so, lets create a new hook_signal($op) which fires at various points
>>>> during a request. Initially, it replace hook_init() and hook_exit()
>>>> with $op=precache, $op=postcache, and $op=exit. We shall also add
>>>> $op=postbootstrap which is where the drupal_add_css calls will go.
>>
>> This is an unneeded level of abstraction. We already have signals that
>> fire at various points during a request. They are called hooks. They
>> are faster and more descriptive than hook_signal($op).
>>
>> hook_precache
>> hook_postcache
>> hook_exit
>
> i agree... but also - none of those makes it clear to me *at all* that I
> should be putting my add_js/add_css code in them.
Maybe add a hook_header?
Cheers,
Gerhard
More information about the development
mailing list