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

14 lines
391 B
Plaintext

<?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);
}