[development] hook_foo() vs. nodeapi
Earl Miles
merlin at logrus.com
Sat May 6 20:47:06 UTC 2006
Khalid B wrote:
> If the module defines a node type, we can still use nodeapi('view'), and
> check $node->type = 'mytype' and do whatever we would do in the
> mytype_view() hook.
>
> Or am I missing something?
Order of operations.
If you just use nodeapi, it's hard to tell where exactly yours will come, even
though you own the module.
If you use foo_hook() you know yours is the only one using that, so you know
exactly what order they'll happen in -- nodeapi will either come before or after
you, completely.
More information about the development
mailing list