By slingeraap on
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...
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
think i got it
print $node->nid;
That's right. $node is an
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