From 0b3650e660cd36ead8f4806afb090d6bdaaa138f Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Tue, 19 Sep 2017 21:41:24 +0200 Subject: [PATCH] Better display of body field --- modules/storm/stormteam/stormteam.theme.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/storm/stormteam/stormteam.theme.inc b/modules/storm/stormteam/stormteam.theme.inc index 51c5af5..33b7f1e 100644 --- a/modules/storm/stormteam/stormteam.theme.inc +++ b/modules/storm/stormteam/stormteam.theme.inc @@ -70,12 +70,14 @@ function theme_stormteam_view($node, $teaser = FALSE, $page = FALSE) { ); } - $node->content['body_field'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#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' => '
', + '#suffix' => '
', + '#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;