Browse Source

Adding field to Status view pages

logicp 7 years ago
parent
commit
795b361426
2 changed files with 5 additions and 0 deletions
  1. 3 0
      status.page.inc
  2. 2 0
      statusmessage.module

+ 3 - 0
status.page.inc

@@ -29,6 +29,9 @@ function template_preprocess_status(array &$variables) {
   foreach (Element::children($variables['elements']) as $key) {
     $variables['content'][$key] = $variables['elements'][$key];
   }
+
+  $variables['content']['status_message'] = $status->getMessage()->view();
+
 }
 
 /**

+ 2 - 0
statusmessage.module

@@ -56,3 +56,5 @@ function statusmessage_theme_suggestions_status(array $variables) {
   $suggestions[] = 'status__' . $entity->id() . '__' . $sanitized_view_mode;
   return $suggestions;
 }
+
+