This commit is contained in:
2023-11-21 17:43:23 +01:00
parent 8b9c030d89
commit d0b2b2e424
124 changed files with 22579 additions and 83 deletions
+7 -2
View File
@@ -9,7 +9,11 @@
* Implements hook_preprocess_HOOK() for html.html.twig.
*/
function reha_preprocess_html(&$variables) {
$node = \Drupal::routeMatch()->getParameter('node');
if ($node){
$variables['attributes']['class'][] = 'node-type-' . $node->bundle();
$variables['attributes']['class'][] = 'node-id-' . $node->id();
}
}
/**
@@ -23,5 +27,6 @@ function reha_preprocess_page(&$variables) {
* Implements hook_preprocess_HOOK() for node.html.twig.
*/
function reha_preprocess_node(&$variables) {
$node = &$variables['node'];
$variables['attributes']['class'][] = 'node-type-' . $node->gettype();
}