Drupal 7 - Trying to get term reference node, from html.tpl I am trying to access the value of a term reference (field_test), from a node, in html.tpl.

First I need to load a specific node, check if the term reference of this node is the same as another value that i have already in the page.

Is someone knows how to access that term reference, with ne $node object?

I have get already the $node, but i cannot access the "field_test" which is inside the $node.

Thanks

emb
Ok, so you'll want to test for a node, then check for the field and then print it to your template. This should work for you:

&lt;?php

if(arg(0)=='node' &amp;&amp; is_numeric(arg(1))) {
        $node = node_load(arg(1));
        if(isset($node-&gt;field_test['und'][0]['value'])) {
            print $node-&gt;field_test['und'][0]['value'];
        }       
}


?>

That's code for Drupal 7