Load vocab description too

joachim - February 27, 2009 - 11:45
Project:Term Display
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm using the DL formatting (as seen on the docs page...) in a project of my own, and I've found today that vocab name isn't always suitable for public consumption.
Eg, it's "Story type" so in the admin I know what it relates to, but for display I maybe just want "Type".

A good way to do this would be to also load the vocab description ("modules use this"!) into the data in $node, like this:

              $node->term_display[$vocabulary->vid]['vocabulary_desc'] = check_plain($vocabulary->description);             

This can then be shown instead of the vocab name.

 
 

Drupal is a registered trademark of Dries Buytaert.