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

pwolanin drupal-docs at drupal.org
Wed Nov 15 21:15:39 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

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.




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'].





More information about the documentation mailing list