Selaa lähdekoodia

Adding field to Status view pages

logicp 7 vuotta sitten
vanhempi
commit
795b361426
2 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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;
 }
+
+