(Tips) Delete Unused Taxonomy Terms From A Free Tagging Vocabulary

DRUPALRANCH Newsletter:

Tips : Delete Unused Taxonomy Terms From A Free Tagging Vocabulary

Description:
Wish taxonomy terms would get deleted when a node is deleted, if they aren't used by any other content?

Agaric brings you the next best thing.

@TODO ben-agaric: turn this into a module

Basically we want to delete any term that doesn't exist in the term_node table, though it would be nice to do this by vocabulary (as in, nice not to accidentally delete your carefully set up non-free tagging vocabulary)

SQL to do this (with Drupal table prefix enabling brackets and using aliases, which (in MySQL) can only be defined after the word using and, if defined, must be used in the DELETE FROM part of the phrase)

| Read more

Courtesy : Agaricdesign.com



Tag Cloud