浏览代码

porposer une opération page title #2436

bach 1 年之前
父节点
当前提交
09b691fd50
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      web/themes/custom/reha/reha.theme

+ 12 - 0
web/themes/custom/reha/reha.theme

@@ -78,4 +78,16 @@ function reha_preprocess_block(&$variables) {
       ]
     );
   }
+  if ($variables['plugin_id'] === "page_title_block") {
+    if (\Drupal::routeMatch()->getRouteName() === 'node.add') {
+      $node_type = \Drupal::routeMatch()->getParameter('node_type');
+      if ($node_type->id() === 'operation') {
+        $variables['content'] = [
+          '#type' => 'page_title',
+          '#title' => 'Proposer une opération'
+        ];
+      }
+    }
+  }
+
 }