By somebodysysop on
I have a content type I have created. It also has fields created using cck. To avoid confusion, I wish to display the body field label on the view page for the content type. I can not find a way to do this. I have searched the Drupal archives, and found only the workaround: delete the core body field and create a body field using cck.
This does not work for me because I have two years worth of data in the current core body field. Does anyone know how to make Drupal display the core body field label when viewing a node?
Comments
hook_view, hook_nodeapi('view')
I have also found suggestions to use hook_view or hook_nodeapi('view'), but can not locate anything which would suggest how to display the body field label using either of these.
How to format changes
I'm getting close, but there are no guidelines on how to actually format $node->content to display label:
function hook_nodeapi(&$node, $op, $teaser) {
switch ($op) {
case 'view' :
// ******************************************************
// *** VIEW
// Display the body field label ('Summary') on node display of arbitration content type.
// ******************************************************
if ($node->type == 'arbitration') {
// All of the below generate errors
// $node->content['body'][#title] = 'Summary';
// $node->content['body'][#label_display] = 'inline';
// $node->body[#label_display] = 'inline';
}
break;
}
}
This isn't perfect, but it resolves the problem
The Display Suite modules
The Display Suite modules among other things adds the ability to show a label for the body.
Thanks!
This looks like what I will have to do if I can't figure out a simpler way by using hook_something.
Thanks a lot the module you
Thanks a lot
the module you pointed out
http://drupal.org/project/ds
resolved a problem of mine
thanks
fab