Hello,

In the file page.tpl, I want to get the node id (nid) of the current page.

That must be known somewhere. But when I use print node, I'm getting "Object id #2" on every page...

Comments

slingeraap’s picture

print $node->nid;

rszrama’s picture

That's right. $node is an object, so if you wanted to just see its contents, you can use print(serialize($node)); or for a specific bit of it like the nid do what you did.

----------------------
Current Drupal project: http://www.ubercart.org