Drupal - display blocks according to node's taxonomy term ID
问题 I'm just trying to restrict block visibility to nodes that have a certain taxonomy ID. I'm using this snippet...: <?php $term_id_to_trigger_show_block = 109; if ((arg(0) == 'node') && is_numeric(arg(1))) { $terms = taxonomy_node_get_terms(arg(1)); foreach($terms as $term) { if ($term->tid == $term_id_to_trigger_show_block) { return TRUE; } } } ?> ...but I get no joy, the block remains hidden on the relevant nodes. Any ideas? Cheers 回答1: It looks like in drupal6 taxonomy_node_get_tree() takes