diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2006,14 +2006,14 @@ // Add a class that tells us what path the page is located make it possible // to theme the page depending on the current path (e.g. node, admin, user, // etc.) as well as more specific data like path-frontpage or - // path-contenttype. + // path-$contenttype. + $path = \Drupal::request()->getPathInfo(); if(drupal_is_front_page()){ $body_classes[] = 'path-frontpage'; - } - if(request_path()){ - $path = explode("/", request_path()); - $body_classes[] = 'path-' . $path[0]; + }else{ + $segment = explode("/", $path); + $body_classes[] = 'path-' . $segment[1]; } $variables['attributes']['class'] = $body_classes;