hook_load
- Versions
- 4.6 – 6
hook_load($node)- 7
hook_load($nodes)
Load node-type-specific information.
This is a hook used by node modules. It is called to allow the module a chance to load extra information that it stores about a node.
For a detailed usage example, see node_example.module.
Parameters
$node The node being loaded. At call time, node.module has already loaded the basic information about the node, such as its node ID (nid), title, and body.
Return value
An object containing properties of the node being loaded. This will be merged with the passed-in $node to result in an object containing both sets of properties.
Related topics
Code
developer/hooks/node.php, line 160
<?php
function hook_load($node) {
$additions = db_fetch_object(db_query('SELECT * FROM {mytable} WHERE nid = %s', $node->nid));
return $additions;
}
?>Login or register to post comments 