I thought it was node/[nid] but that didn't work, I'm looking to setup FAQ as node/number like here on Drupal.

Comments

abdullah5588’s picture

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

espirates’s picture

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.

nevets’s picture

If you mean you want the url to use the path alias, for just the url you can use (assuming you have node object)

<?php
print  ulr("node/$node->nid");
?>

For a link you can you something like (that is a lower case L)

<?php
print  l($node->title, "node/$node->nid");
?>
hershel’s picture

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]

nevets’s picture

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)