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) { ]); } */ + 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 }}