Skip to main content
Drupal 8 Notes
  • Contribute
  • RSS RSS

How to get the current path in Drupal 8

How to get the current path
1
$current_path = \Drupal::request()->getRequestUri();
Tweet
  • How to set active links for menu items »
Is this post incomplete? Want to help? Add a comment below or click here to contribute.

This site is hosted on Github. Want to help?