Skip to content

Instantly share code, notes, and snippets.

@markconroy
Created September 21, 2016 15:02
Show Gist options
  • Save markconroy/d61d4df5c96e1f7e56b981f78abb0ba7 to your computer and use it in GitHub Desktop.
Save markconroy/d61d4df5c96e1f7e56b981f78abb0ba7 to your computer and use it in GitHub Desktop.
function MYMODULE_template_preprocess_default_variables_alter(&$variables) {
$current_path = \Drupal::service('path.current')->getPath();
$variables['current_path'] = $current_path;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment