From cdfd06122645adcdae3f476953142468aeb4c6be Mon Sep 17 00:00:00 2001 From: rdrew Date: Wed, 25 Mar 2026 12:17:43 -0300 Subject: [PATCH 1/2] sync --- olivesnews.theme | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/olivesnews.theme b/olivesnews.theme index 094a683..e772581 100755 --- a/olivesnews.theme +++ b/olivesnews.theme @@ -44,6 +44,20 @@ function olivesnews_preprocess_html(&$variables) { 'href' => $variables['olivesnews_path'] . '/css/components/navigation/nav-primary-no-js.css?' . $query_string, ], ]; +// Use routeMatch — this is the modern, preferred way. + $node = \Drupal::routeMatch()->getParameter('node'); + + if ($node instanceof \Drupal\node\NodeInterface) { + // Add a simple node-ID class (most common format today). + $variables['attributes']['class'][] = 'node-' . $node->id(); + + // Optional: Add the classic Drupal 7-style class if you prefer / need it for legacy CSS. + // $variables['attributes']['class'][] = 'page-node-' . $node->id(); + + // Optional extras people often add at the same time: + // $variables['attributes']['class'][] = 'node-type-' . $node->bundle(); + // $variables['attributes']['class'][] = 'node-' . $node->bundle(); + } } @@ -728,3 +742,4 @@ function olivesnews_preprocess_mirador(&$variables) { ]); } */ + From 224c72e80a546c2ee9f5f2af2504a754fa699b8a Mon Sep 17 00:00:00 2001 From: rdrew Date: Thu, 26 Mar 2026 09:35:49 -0300 Subject: [PATCH 2/2] sync --- .../block--views-block--download-media-issue-block-1.html.twig | 2 +- templates/content/node--islandora-object.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/block/block--views-block--download-media-issue-block-1.html.twig b/templates/block/block--views-block--download-media-issue-block-1.html.twig index 73926f2..1f35962 100755 --- a/templates/block/block--views-block--download-media-issue-block-1.html.twig +++ b/templates/block/block--views-block--download-media-issue-block-1.html.twig @@ -49,7 +49,7 @@ layout ? 'layout--' ~ layout|clean_class, {{ title_suffix }} {% block content %}
- Show All Pages + Show All Pages {{ content }} diff --git a/templates/content/node--islandora-object.html.twig b/templates/content/node--islandora-object.html.twig index dfea06b..de21130 100755 --- a/templates/content/node--islandora-object.html.twig +++ b/templates/content/node--islandora-object.html.twig @@ -12,7 +12,7 @@ view_mode ? 'node--view-mode-' ~ view_mode|clean_class, ] %}
- About + About
{{ title_prefix }}