[documentation] [Documentation bug] hook_view() and hook_nodeapi($op = 'view') have changed

pwolanin drupal-docs at drupal.org
Sun Nov 19 03:29:22 UTC 2006


Issue status update for 
http://drupal.org/node/97695
Post a follow up: 
http://drupal.org/project/comments/add/97695

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Darren Oh
 Updated by:   pwolanin
-Status:       active
+Status:       fixed

updated this page a bit:  http://drupal.org/node/64279#node-view




pwolanin



Previous comments:
------------------------------------------------------------------------

Wed, 15 Nov 2006 04:40:54 +0000 : Darren Oh

This passage is not helpful at all:


"
Nodes are now prepared for display by assembling a structured array in
$node->content, rather than directly manipulating $node->body and
$node->teaser. The format of this array is the same used by FormAPI.


"

Users need to know what replaces $node->body and $node->teaser. I
recommend adding an explanation of exactly how to manipulate the body
and teaser, something like this:


Instead of modifying $node->body or $node->teaser, you now modify
$node->content['body']['#value'].



------------------------------------------------------------------------

Wed, 15 Nov 2006 21:15:39 +0000 : pwolanin

That's not really right- depends what you mean by modifying.  If you
want to add more content, you sould add more array aelements, like
$node->content['mymodule']['#value'] = "
Hello world


";


You would only modify $node->content['body']['#value'] if you want to
change the content retreived from the DB.




------------------------------------------------------------------------

Thu, 16 Nov 2006 06:47:24 +0000 : Darren Oh

Thanks for the clarification. That's what needs to be in the handbook.






More information about the documentation mailing list