Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
That didn't work, I'm trying to use pathauto for FAQ content type, i want the URL's to look like node/id like some of the content is here on Drupal.org.
Where/how are you trying to set the url. Paths to nodes are of the form node/{nid}, for example node/1. Using PHP code if you already have a node object you can produce a link with l($node->title, "node/$node->nid") (the function name is a lowercase L)
Comments
Hi there, It should be
Hi there,
It should be node/$node->id. Let me know if it works or otherwise please give some more details on what you are trying to do exactly.
Abdullah
Dash Planet
That didn't work, I'm trying
That didn't work, I'm trying to use pathauto for FAQ content type, i want the URL's to look like node/id like some of the content is here on Drupal.org.
If you mean you want the url
If you mean you want the url to use the path alias, for just the url you can use (assuming you have node object)
For a link you can you something like (that is a lower case L)
To be more precise, it will
To be more precise, it will be yoursite.com/node/[nid] if you have clean URLs enabled. But if not, then the URL will be yoursite.com/?q=node/[nid]
Where/how are you trying to
Where/how are you trying to set the url. Paths to nodes are of the form node/{nid}, for example node/1. Using PHP code if you already have a node object you can produce a link with
l($node->title, "node/$node->nid")(the function name is a lowercase L)