B. Advanced Usage

Last updated on
3 May 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Skipping Sections

If there are certain phrases or sections of text you want to not be scanned and flagged, you may indicate this with a special tag: [no-glossary]...[/no-glossary]. This will cause the filter to skip everything in between those pseudo-tags.

Using Glossary to Display Only

You can create a dedicated glossary for some pages of your site. To do so, create a new vocabulary and put the special terms in it. Then create a new input format and add the glossary filter to it. Then configure the glossary filter for that format to look at the new vocabulary. Finally, affiliate the special pages with this input format and you will get the desired behavior.

HTML in Term Descriptions

The description you enter for a term will be displayed for the term and in the overview. You may include HTML within the description but it will be filtered by the default input format (usually "Filtered HTML") so you must ensure that any tags that you use are allowed by that filter.

Shortening the Glossary Overview

This assumes that you have selected the "Show glossary across many smaller pages" option on your settings page.

Currently when a user enters the Glossary overview page using the menu entry, they will see the entire glossary list. At that point, they can click on the alphabar at the top and, depending on your settings, see a page with only the terms starting with the requested first letter. It is possible to shorten the list to, for example, just the letter "a" by changing the menu.

  • Go to Administer » Site building » Menus.
  • Locate the Glossary entry in the menu and click on the "Edit" link.
  • Change the path to glossary/1234/lettera, where "1234" is the vocabulary number for the glossary vocabulary. To use a different starting letter change the letter at the end of that URL.
  • Save the menu item.

Styling

The Glossary module's output is replete with styling choices. There is a CSS file included with it that is a useful starting point for styling. Because this file may be changed at any time by updating the module, it is recommended that you copy any styles you want to keep to your site's style sheet.

One common change is to make the alphabar larger. The whole alphabar is part of the "glossary-links" <div> and the used letters are links. Therefore used and unused letters may styled differently.

.glossary-links {
  color: #669966;
}

.glossary-links a {
  font-size: 125%;
}

Other Modules

The Glossary module will call the Taxonomy Image module, if it's enabled, to allow you to display an image for each term in the glossary.

We will also work with the Hovertips and Clicktips module to produce fancier hovertips. This also allows the tip to "glossarize" another level deep within the glossary definition.

Some people have used Glossary together with Taxonomy Redirect to have clicking on the indicator take their users to a page showing all nodes that include that term.

The Glossary module does not provide a way to move the administration of the glossary terms outside of the admin interface. If you want to do this, have a look at Taxonomy Delegate or Vocabulary Permissions.

Firefox Tool Tips

Firefox "fix" for hover tips: there's a Firefox add-in called "Long Titles" that allows the tool tips display to be expanded to include the whole tip.

Languages

Drupal 5.x

(From http://drupal.org/node/48966) In your settings.php file you must insert something like the following:

$conf['i18n_languages']['locales'] = array(
"pt-br" => "pt_BR.UTF8",
"fr" => "fr_FR.UTF8",
"en" => "en_US.UTF8",
"es" => "es_ES.UTF8");
<
The actual content depends on the languages you use and locales you have installed.

Drupal 6.x

If you want your definitions to only appear in one language (and not any others you have running on your site), you can set the Vocabulary you are using to "Set language to vocabulary" and then define a language for your terms.

If you would like to have your terms be defined in more than one language, you must set the Vocabulary to "Per language terms" and for each term you can set the language. To have a term appear in two languages, you need to create two terms, one set to each language.

 

Help improve this page

Page status: No known problems

You can: