Created
September 27, 2016 13:37
-
-
Save LittleCoding/482bbcffbaa2a1cfaa53c6bcf35273ba to your computer and use it in GitHub Desktop.
Current URL path via Twig in Drupal 8
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
{# | |
/** | |
* @file | |
* Get the current URL path via Drupal 8 route name and twig function. | |
*/ | |
#} | |
<a href="{{ url('<current>') }}">Current page</a> |
Nice, thanks for sharing!
Thanks, works well! For more URL path Twig tips in Drupal, see Functions in Twig templates.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, it works perfectly.