I don't understand why modules have to destroy the $node->body when they add their output to the content.
What I mean, is when a module adds its output to the node by irreversibly merging the output into the $node->body
, leaving no way for the theme developer to access the original "Body" (I am referring to default textfield, labelled "Body", where the main text of the story was entered).
A good example of this is how the upload module adds the attachments table to the node like this:
$node->body .= theme('table', $header, $rows, array('id' => 'attachments'));
The problem being, what if, as a theme developer, I want to separate the display of the attachments table from the text body of the node? Well, I can't.
Sure I can access the uploaded attachments by way of $the node->files array; so now I can theme that content by itself, but the original "Body" is completely unavailable in the $node
object without the attachments table tacked onto it.
I used the upload module as an example, but there are many modules where this is a problem (e.g. image module, e-commerce module, the list goes on).
I guess here's how I think it should be (again using the upload module as an example):
$node->body
should be just the the original node body -- meaning just the text that is actually in the field that says "Body".