I want to print out a script from facebook on a specific node page in my html.tpl.php file. What is the best way of doing this? looking for nid? I need some kind of a if statement...
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
a hacky solution in html.tpl.php could be like this:
$node = node_load(arg(1)); echo $node->nid;
You'll want to check for the existence of $node and such to avoid errors.
You could also create your own node template: node--123.tpl.php
You could also use the HOOK_preprocess_page() function to check for the node ID.