Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Drupal 8 get page node current path

// Get current path.
$current_path = Drupal::service('path.current')->getPath();
$path_alias = Drupal::service('path_alias.manager')->getAliasByPath($current_path);
 
PREVIOUS NEXT
Tagged: #Drupal #page #node #current #path
ADD COMMENT
Topic
Name
1+1 =