I am developing a simple module for drupal 7.x to manipulate node content depending on the value of a cck field. Actually I am going to hide the field_presenation if the field_status = 1.开发者_如何学Go I tried to use hook_node_load and it worked but unfortunately it's called before viewing the node or editing it which is not what I need. I tried hook_node_view but it never got executed for unknown reason.
In drupal 6.x I used to use hook_nodeapi and check if $op = 'view' and it worked fine.
And see this page? All of these hooks are called in a description of
use hook — hook_nodeapi() see Drupal API — https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_view/7
精彩评论