taxonomy

Block visibility based on taxonomy term

If you want a particular block, to only show on pages with a specific taxonomy term, drop this snippet into the block visibility field


if ((arg(0) == 'node')) {
$node = node_load(arg(1));
foreach ($node->taxonomy AS $vocab) {
if($vocab->tid == 185){
return true;
}
}
}
return false;

Of course, they're are much more elegant ways to handle this using views/arguments

Enabling Custom taxonomy markers in views

As part of the build out of a recent client site with location enabled architectural case studies, I modified the Gmap module (patching gmap_plugin_style_gmap.inc) to support taxonomy markers in Gmap Views (http://drupal.org/node/327053). Previously custom markers were only displayed on the standard map/node page.

The inspiration for my patch was included as part of DEV (http://ftp.drupal.org/files/projects/gmap-6.x-1.x-dev.tar.gz) , but not the desired functionality.

Syndicate content