Drupal 8 Get Page Node Current Path

[Solved] Drupal 8 Get Page Node Current Path | Php - Code Explorer | yomemimo.com
Question : Drupal 8 get page node current path

Answered by : gleaming-gannet-htlwomz3dthc

// Get current path.
$current_path = \Drupal::service('path.current')->getPath();
$path_alias = \Drupal::service('path_alias.manager')->getAliasByPath($current_path);

Source : | Last Update : Sun, 27 Sep 20

Answers related to drupal 8 get page node current path

Code Explorer Popular Question For Php