Chapter 12. Tagging

Social tagging allows users to ascribe words or brief phrases ("tags") to objects to facilitate finding and gathering based on a flat (non-hierarchical) taxonomy.

Tagging is enabled by default, but can be disabled on a global basis in the Control Panel. This will prevent receiving of tags via both the template engine and the HTTP API, but will not affect output of tags in either of these components. Tags that have already been received and approved will still appear.

In the template engine, tagging can also be disabled on a per-template set basis by removing any calls to $view->getHelper()->getHtmlTaggingSection() from the templates.

The social tagging section can be included within an object view template (object/single.html.php and object/compound.html.php) using the $view->getHelper()->getHtmlTaggingSection() method. This method will handle all aspects of generating the tag input form. dmBridge will post status messages to the flash in response to certain types of user input to this form - for example, when validation has failed or when the tag has been successfully posted. Therefore, when including social tagging in the template, it is a good idea to also include a call to DMGenericTemplateHelper::getHtmlFormattedFlash() in a conspicuous place in the template as well, in order to provide feedback to the user as to what has just happened in response to their input.