schunder-madre/web/themes/custom/schunder/schunder.theme

14 lines
391 B
Plaintext
Raw Normal View History

2021-11-25 21:27:41 +01:00
<?php
/**
* Implements hook_preprocess_html().
*/
function schunder_preprocess_html(&$variables) {
// Get the current path
$current_path = \Drupal::service('path.current')->getPath();
$internal_path = \Drupal::service('path_alias.manager')->getAliasByPath($current_path);
// Assign it to body class
$variables['attributes']['class'][] = str_replace("/", "", $internal_path);
}