From 09b691fd503c290584fc1300fd5907f94b0d733d Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 27 Nov 2023 12:20:36 +0100 Subject: [PATCH] =?UTF-8?q?porposer=20une=20op=C3=A9ration=20page=20title?= =?UTF-8?q?=20#2436?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/themes/custom/reha/reha.theme | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/themes/custom/reha/reha.theme b/web/themes/custom/reha/reha.theme index efb77b4..80fa15b 100644 --- a/web/themes/custom/reha/reha.theme +++ b/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' + ]; + } + } + } + } \ No newline at end of file