diff --git a/includes/bean.core.inc b/includes/bean.core.inc index 05530fc..184ea0b 100644 --- a/includes/bean.core.inc +++ b/includes/bean.core.inc @@ -348,6 +348,19 @@ class Bean extends Entity { */ public function view($view_mode = 'default', $langcode = NULL, $page = NULL) { $content = parent::view($view_mode, $langcode); + + // Add the title so that it may be controlled via other display mechanisms. + $content_key = key($content['bean']); + + if (!empty($this->title)) { + $content['bean'][$content_key]['title'] = array( + '#theme' => 'html_tag', + '#tag' => 'span', + '#value' => $this->title, + '#attributes' => array('class' => 'bean-title'), + ); + } + if (empty($this->plugin)) { return $content; }