hey all -

i know so little about php, i'm having trouble being able to call and use a node's term id (tid). thanks in advance for any help you can offer.

i'm working on a site where i need to override the $terms variable in order to provide links back to named anchors on a table of contents page done with views.

in my node-node_type.tpl.php file, i've been trying to figure out how to make a new link using the node's tid. i looked at the $node->taxonomy array:

  [taxonomy] => Array
        (
            [18] => stdClass Object
                (
                    [tid] => 18
                    [vid] => 1
                    [name] => Equity, Neighborhood-Based and Grassroots Racial Justice Planning
                    [description] => 
                    [weight] => 7
                )

        )

but can't seem to be able to actually print the tid! i've tried a million variations, including $node->taxonomy['#value']['tid'], and even trying to use taxonomy_get_term($tid)... i'm really at a loss.

the answer to this is probably really simple... ;)
thanks!
-ryan

Comments

esllou’s picture