I'm hooking nodeapi op=view and I have the node I hook and another in the db. The one I hook has field_image which, when hooked, is [0]=>NULL
I load a node from the db, which also has an image field (both are CCK imagefields). I want to add its image to the original node, however, I need at this point not to add it to field_image, but to $node->content->field_image. The problem is that the structure of ->content is pretty convoluted, ending ultimately in data that is the same as what I've copied (when I look at a node with an image), but I can't seem to cause that to happen. I tried adding the image structure from the source node directly:
$node->content->{$field_name}['field']['items'][$key]['#item'] = $image_structure;
but that seems to
cause more convolution rather than ending up like the
$node->content structure from the source node when I display
it. --
|
- [development] D6 Adding an image to a node for viewing jeff
- [development] D6 Adding an image to a node for viewing jeff