load $node
view$node
alter $node

any different between this three ?

Comments

tashicoder’s picture

hey Sownn,

This might help you

• load: The basic node object has been loaded from the database, plus the additional
node properties set by the node type (in response to hook_load(), which has already
been run; see “Modifying Nodes of Our Type with hook_load()” earlier in this chapter).
You can add new properties or manipulate node properties.

• alter: The node’s content has gone through drupal_render() and been saved in
$node->body (if the node is being built for full view) or $node->teaser (if the node is
being built for teaser view), and the node is about to be passed to the theme layer.
Modules may modify the fully built node. Changes to fields in $node->content should
be done in the view operation, not this operation.

• view: The node is about to be presented to the user. This action is called after
hook_view(), so the module may assume the node is filtered and now contains HTML.
Additional items may be added to $node->content (see how we added a joke punch line
previously, for example).

populist’s picture

Status: Active » Closed (fixed)