New answers tagged path-aliases
0
votes
How to get the page title from the alias?
You can try this for nodes:
$path = \Drupal::service('path_alias.manager')->getPathByAlias('/your/path/alias');
$pathArray = explode("/", $path);
$node = \Drupal\node\Entity\Node::load(...
Top 50 recent answers are included
Related Tags
path-aliases × 8517 × 244
8 × 147
views × 126
taxonomy-terms × 90
nodes × 77
uri × 75
tokens × 56
i18n-l10n × 55
redirection × 42
6 × 38
routes × 37
entities × 26
users × 19
hooks × 18
theming × 17
navigation × 17
9 × 13
database × 12
commerce × 10
migrations × 10
forms × 9
files × 9
organic-groups × 8
importing-exporting × 8