[support] can i hook a hook?

Larry Garfield larry at garfieldtech.com
Fri Dec 10 04:04:59 UTC 2010


Some hooks that offer definitions, like hook_menu(), will have a corresponding 
alter hook like hook_menu_alter().  There is no alter hook for hook_block(), 
though.  That said, there is an alter hook for all forms, hook_form_alter().  
So if you're manipulating a form you may be able to do so that way.

--Larry Garfield

On Thursday, December 09, 2010 9:22:48 pm sebastian wrote:
> Hello,
> 
> Having a terrible time finding anything about this, and all I can find
> on Drupal.org is the API for hooks, which doesn't really explain enough.
> 
> My question is, if there is a contrib module with an implementation of:
> 
> hook_block()
> 
> such as:
> 
> nodeasblock_block()
> 
> How can I change the values inside of this function, without changing
> the function directly?
> 
> can I write something in template.php to catch the nodeasblock_block
> hook and then change the values in it?
> 
> Or do I need to change the nodeasblock module directly? perhaps adding
> the feature as a full blown check box addition or just hack it??
> 
> Thanks for any help you can provide me!
> 
> kindly,
> 
> Sebastian.


More information about the support mailing list