Better display of body field

This commit is contained in:
Manuel Cillero 2017-09-19 21:41:24 +02:00
parent 0ac7a5d805
commit 0b3650e660

View file

@ -70,12 +70,14 @@ function theme_stormteam_view($node, $teaser = FALSE, $page = FALSE) {
);
}
$node->content['body_field'] = array(
'#prefix' => '<div class="stormbody">',
'#suffix' => '</div>',
'#value' => theme('storm_view_item', t($type->body_label), $node->content['body']['#value']),
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : 0,
);
if (strlen(trim(html_entity_decode(strip_tags($node->content['body']['#value']))))) {
$node->content['body_field'] = array(
'#prefix' => '<div class="stormbody">',
'#suffix' => '</div>',
'#value' => theme('storm_view_item', t($type->body_label), $node->content['body']['#value']),
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : 0,
);
}
unset($node->content['body']);
return $node;