From 4e47d9fe40eca16dc3cbe85aeeedad64debd8b43 Mon Sep 17 00:00:00 2001 From: ouidade Date: Mon, 26 May 2025 15:42:24 +0200 Subject: [PATCH] debug node-id --- web/themes/custom/eql/eql.theme | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/themes/custom/eql/eql.theme b/web/themes/custom/eql/eql.theme index c81a414..7ad274a 100644 --- a/web/themes/custom/eql/eql.theme +++ b/web/themes/custom/eql/eql.theme @@ -14,6 +14,10 @@ use Drupal\Core\Template\Attribute; function eql_preprocess_html(&$variables) { $node = \Drupal::routeMatch()->getParameter('node'); + if ($node){ + $variables['attributes']['class'][] = 'node-type-' . $node->bundle(); + $variables['attributes']['class'][] = 'node-id-' . $node->id(); + } if ($node instanceof NodeInterface) { $variables['attributes']['class'][] = 'node-type-' . $node->bundle(); $variables['attributes']['class'][] = 'node-id-' . $node->id();