Add a lexicon/glossary

Introduction
A Scratchpad lexicon/glossary is a taxonomy that is displayed differently to other taxonomies and links to terms in certain text fields (like Taxon Descriptions) in a Scratchpad.

The main glossary page has an optional description (either images, text or both) with a horizontal list of numbers and letters for glossary terms beginning with that letter. Clicking on one of these numbers/letters will take you to a list of terms.



By adding parent terms a glossary can be made hierarchical and this hierarchy can be shown in a side menu. However a hierarchical glossary interferes with the alphabetical sorting on the general glossary page, because only the child terms for one parent term are sorted. If the glossary page is set so that one page is shown for each letter, terms starting with this letter will appear on the correct page, but within this page they will show in hierarchical order, not alphabetical order.



Create a vocabulary and add terms
To create a lexicon/glossary you need to first create a new taxonomy
 * 1) From the Admin menu go to Structure then click Taxonomy
 * 2) Click on the Add vocabulary link
 * 3) Enter the vocabulary name, e.g. "Glossary" and optionally a description
 * 4) Select "Not a biological classification"
 * 5) Click Save

Having created a vocabulary you now need to add the list of terms. This can be done by importing your own file (see Import your own classification). Alternatively you can add terms one by one by clicking on Add terms when you are on the Taxonomy admin page or Edit terms. Add three example terms now. You need to add a NAME and a DESCRIPTION for each term.

Enabling and configuring the lexicon module

 * 1) From the Admin menu go to Structure > Tools
 * 2) In the Other section turn the lexicon On
 * ToolsLex.jpg
 * 1) Click Save
 * 2) At the top of the Tools page you get a notice that the Lexicon module has been installed and a link to configure it. This configuration link is now also available in the section where you activated the module as well as under Configuration in the Admin menu in case you want to change the configuration later.
 * LexiconSettings.jpg
 * 1) Click on the configuration link and select the vocabulary you want to use
 * 2) Select Show lexicon term descriptions
 * 3) Click Save configuration
 * LexiconPath.jpg
 * 1) Click on the Path, titles and intros tab to change the URL path to something like "glossary". If you want a link to the main glossary page to appear in the Main menu you need to create a menu item separately (see Customize menus).
 * 2) Add an introduction text
 * 3) Click Save
 * Glossary.jpg
 * 1) Find or create a page that shows one of your glossary terms to check out your new glossary

Adding fields
You can add more fields to the taxonomy you use for the glossary in order show more information for the terms and attach media. To do this:
 * Click on Settings for the vocabulary and then on the Manage fields tab where you can add new fields.

Adding synonyms
You can add synonyms for a term, which will be highlighted, and include a link to the valid term on the glossary page. To add synonyms you have to add a special field to the glossary vocabulary.
 * 1) From the Admin menu go to Structure > Taxonomy
 * 2) Click on for your glossary and then on the  tab.
 * 3) Click Add new field with the label "See also:" and field name "synonym". Select Term reference as field type and "Autocomplete term widget" as form element
 * 4) Click Save
 * 5) Select your glossary vocabulary
 * 6) Click Save again.
 * 7) From the Admin menu go to Configuration > Lexicon settings
 * 8) Click on the Related terms, synonyms and image tab
 * 9) Select the field you just created ("See also:")
 * 10) Click Save
 * 11) Enter a synonym term the same way you have added the other glossary terms, but in the synonym field enter the valid term. In the description field enter an explanation like "plural for XY". If you don't add a description the term will not be highlighted in Scratchpad text but it will appear on the respective glossary page.