Answers for "drupal 8 get node path"

0

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);
Posted by: Guest on September-20-2020
0

drupal 8 get theme path

$themeHandler = \Drupal::service('theme_handler');
$themePath = $themeHandler->getTheme($themeHandler->getDefault())->getPath();
Posted by: Guest on October-02-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language