Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

drupal 9 node get url alias

Drupal 8
$alias = Drupal::service('path.alias_manager')->getAliasByPath('/node/'.$nid);

Drupal 9
$alias = Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$nid);
Source by drupal.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #drupal #node #url #alias
ADD COMMENT
Topic
Name
8+1 =