Chris 2pha Brown. Drupal developer Brisbane Australia

Chris Brown

Drupal, Javascript, Three.js, 3D

website blog

taxonomy stuff

image for Drupal Vehicle taxonomies pre configured and ready for import

Many times in the past I have wanted a taxonomy structure for things like car makes and models or Australian States and Suburbs and find myself recreating them every time. So today I decided its probably better to have them stored somewhere. Luckily the Taxonomy Manager module easily allows you to export and import taxonomy data easily. I know there are other options for importing and exporting.....

image for Drupal 7 - Changing taxonomy term link paths

I have seen many questions on the web about how to change the path of the taxonomy term links, so it seems to be a common thing to want to do, I know I have wanted to do this on many projects. Recently on a project I wanted these links to point to a view with an exposed filter on taxonomy. As I had this view to list and filter nodes, there was no real reason for the standard taxonomy term pages.....

image for Disable taxonomy term delete button if term has nodes

The below snippet will disable the delete button on the taxonomy term edit page if the term has any nodes assigned to it. It implements hook_form_FORM_ID_alter() function hook_form_taxonomy_form_term_alter(&$form, &$form_state) { $query = db_select('taxonomy_index', 't'); $query->condition('tid', $form_state['term']->tid, '='); $query->join('node', 'n', 't.nid = n.nid'); $count =.....