[development] hooks after hook_menu CALLBACKS called, but before page rendered
Rob Barreca
rob at electronicinsight.com
Thu Oct 19 05:46:14 UTC 2006
So this hook is the equivalent of an 'alter' (hook_nodeapi('alter'),
hook_link_alter(), hook_form_alter()). Meaning it would be a
hook_breadcrumb_alter() of some sorts? Moshe, was there an issue for
your similar request?
Rob Roy Barreca
Founder and COO
Electronic Insight Corporation
http://www.electronicinsight.com
rob at electronicinsight.com
_craig wrote:
>> You could always do it in template.php.
>>
>
> Thanks for the suggestion! I hadn't thought of that. However, I am really
> trying to keep everything encapsulated in a module without requiring users
> of the module to change a theme or patch core.
>
> I did have one thought but quickly discounted it figuring it would make for
> REALLY ugly hack:
>
> 1. Give the taxonomy_breadcrumb module a weight such that it's hook_menu
> gets called last.
> 2. Access the global menu object (hack!) and overwrite each callback with my
> own (hack!!). I'd make the first callback argument the "real" callback
> function's name and use arguments 2 - N+1 to contain the original N
> arguments used by the original callback.
> 3. In my callback that would ALWAYS get called, I'd then look at the first
> argument to find the "real" callback to call, and then pass the rest on to
> the function indicated by the first. Following return to my callback
> function I'd then be able to do whatever I wanted to the page and be assured
> I was the last to have control of the breadcrumbs (and anything else on the
> page).
>
> Perhaps it would be better to try and get a new hook put into core? Being
> relatively new to drupal I'm not sure of the process or historical context
> of adding hooks to core. Do I simply write an issue and submit a patch--now
> or after 5.0 is released? Do I need to drum up support for it?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20061018/fcea6784/attachment.htm
More information about the development
mailing list