Last active
January 15, 2019 14:23
-
-
Save vkechagias/6f5a9322287a77fd2e1a82d1b686fa23 to your computer and use it in GitHub Desktop.
Drupal 8: Get current page route name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function THEME_preprocess_page(&$variables) { | |
$variables['route_name'] = \Drupal::routeMatch()->getRouteName(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment