Hi Drupal-Fans,

I would like to print the relative URL of a page in a block, i.e.

www.tld.com/content/test

I would like to print content/test

Is there a variable accordant to print $node->nid; that gives me the URL?

Thanks!

Comments

nevets’s picture

It that is the alias of the node referenced you can use print url("node/$node->nid")

quotientix’s picture

Perfect, many thanks!