Skip to main content
DrupalABC

Main navigation

  • Home
  • Search
  • Learn Drupal
  • Certifications
  • Drupal Code Finder
User account menu
  • Log in

Breadcrumb

  1. Home

How to set URL alias of node when using Pathauto module?

You can use the following code to set URL alias for a node if your website also uses Pathauto

Where $node_url is the desired alias and $node is loaded node object.

Tags
Node
Drupal8
Pathauto
Disqus
DrupalABC

Footer

  • Buy me a coffee
  • Drupal.org profile
  • LinkedIn
Powered by Drupal

Drupal is a registered trademark of Dries Buytaert