[development] D6 Adding an image to a node for viewing

jeff at ayendesigns.com jeff at ayendesigns.com
Tue Feb 1 15:15:44 UTC 2011


I'm a little befuddled... do I replace the node's image field with the 
desired one, and then invoke it to rebuild the content portion, or do I 
invoke it and then replace the field within the content portion?

On 02/01/2011 02:39 AM, Carl Wiedemann wrote:

> On the secondary node, try implementing node_build_content(), which 
> should provide to you the secondary $node->content array, or I think 
> you might get this by calling node_invoke_nodeapi($node, 'view', 
> $teaser, $page) directly. See the internals of node_build_content() 
> http://api.drupal.org/api/drupal/modules--node--node.module/function/node_build_content/6 
>
>
> Keep in mind this *will* invoke hook_nodeapi($op = 'view') for the 
> secondary node, which will call your hook_nodeapi() *again,* so make 
> sure you aren't doing anything redundant or getting stuck with 
> infinite recursion somehow.


More information about the development mailing list