Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By djh1979 on
I'm trying to create a menu in a series of template pages using node/123 etc as the link value instead of hardcoding the url alias in case the page title (and alias) changes at some point in the future.
I've tried using drupal_get_path_alias('node/123') to reference node values, but all links are just returning the current page url alias.
Any help greatly appreciated.
Comments
Global Redirect
So I added the Global Redirect module and it's kind of working as I needed.
On hover, the link preview still shows node/123 etc but when the page is visited it shows the url alias in the url.
Does this sound like the best/most obvious way to achieve this?