/**
  * If a notice has a title, show it in the <h1> element
  *
  * @param Action $action Action being executed
  *
  * @return boolean hook value
  */
 function onStartShowPageTitle($action)
 {
     $actionName = $action->trimmed('action');
     if ($actionName == 'shownotice') {
         $title = Notice_title::fromNotice($action->notice);
         if (!empty($title)) {
             $action->element('h1', null, $title);
             return false;
         }
     }
     return true;
 }
 /**
  * If a notice has a title, show it in the <h1> element
  *
  * @param Notice $notice Notice we're getting the title for
  * @param string $title  Reference to the variable which we set to the notice's title
  *
  * @return boolean hook value
  */
 function onGetNoticeTitle(Notice $notice, &$title)
 {
     $title = Notice_title::fromNotice($notice);
     if (!is_null($title)) {
         return false;
     }
     return true;
 }