Drupal's Taxonomy system has offered the ability to store synonyms for almost a decade. When the term 'Chicago' is defined as a category, for example, Drupal allows you to add 'Windy City' as a potential alternative. What Drupal doesn't do, however, is use that synonym anywhere. That's where the Synonyms module comes in.

Setting the module up requires two steps. First, an admin chooses how terms' synonyms should be stored. The module can use Drupal's default field -- basically a text area full of comma-delimited synonyms for each term -- or any number of term reference or entity relationship fields attached to the Taxonomy Vocabulary. The simple approach is convenient, but the more complex relationship-based approach allows even synonyms to be "real" taxonomy terms with their own landing pages.

Once Synonym storage is squared away, an administrator must configure the rest of the site's term references (like the "Tags" field on Drupal's default article content type) to use a special synonym-aware editing widget. It's identical to Drupal's default free-tagging widget, but smart enough to auto-complete synonyms while storing the "official" term.

The Synonyms module is flexible, reliable, and simple to set up once you understand what it's actually doing. (Be sure not to tell the module that a vocabulary is its own list of synonyms, for example: things get confused...) For complex sites that make use ot controlled vocabularies, its more flexible synonym storage is welcome but the autocomplete widget it offers doesn't give much help on the input side. If your site uses free-tagging taxonomy fields to categorize content, and want to keep your pool of categories and terms under control, it's a great solution.

Published in

If you enjoyed this Article, you may also enjoy...

Jeff Eaton

Thumbnail
Jeff Eaton is world renowned for his opinions on Content Strategy, Drupal development, bacon, gummy candy, and cats.