Created
April 14, 2011 02:49
-
-
Save ChrisLTD/918809 to your computer and use it in GitHub Desktop.
Show block on Taxonomy term listings if it is inside a particular vocabular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Show block on Taxonomy term listings | |
$make_block_visible = FALSE; | |
$vocab_id_to_trigger_show_block = 8; | |
if ((arg(0) == 'taxonomy') && (arg(1) == 'term')) { | |
$term_obj = taxonomy_get_term(arg(2)); | |
$vocab_id = $term_obj->vid; | |
if($vocab_id == $vocab_id_to_trigger_show_block){ | |
$make_block_visible = TRUE; | |
} | |
} | |
return $make_block_visible; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment