Skip to content

Instantly share code, notes, and snippets.

@mortendk
Created April 30, 2014 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mortendk/29d6500b17d045066964 to your computer and use it in GitHub Desktop.
Save mortendk/29d6500b17d045066964 to your computer and use it in GitHub Desktop.
$path = \Drupal::request()->getPathInfo();
if($path){
$foo = explode("/", $path);
$body_classes[] = 'path-' . $foo[1];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment