Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
drupal/melt_glossify / README.md
Size: Mime:

melt Glossify v1.1.0

Leverages Glossify module, its Glossify Taxonomy sub-module, Tippy.js for handling tooltips and the Token module.

Setup

  1. Create a taxonomy vocablulary with terms
  2. Enable melt_glossify

Methods for highlighting glossary terms on a page

1. Configure Glossify to automatically choose terms for you

The default functionality Glossify provides automatically chooses the first term or all instances of a term for you:

  1. Go to Text Formats: admin/config/content/formats
  2. Go into each text format you want to have glossify and enable the Tooltips with taxonomy option and choose the taxonomy vocabulary to have terms glossified
  3. Done!

2. Using melt Glossify's custom token

If you open up a token browser window, you'll find a global melt Glossify token that can be used in places where you want more control over the placement of terms.

Token format

Basic

[meltglossify:<vocab_machine_name>:<termname/id>:?<label_override>]

Replace <vocab_machine_name> with the machine name of the vocabulary and <termname/id> with the term name or term id.

Custom label

[meltglossify:<vocab_machine_name>:<termname/id>:?<label_override>]

If you need to override the term name with a custom label.

Example

Say we have a vocabulary called Glossary and it has a few terms like cat, dog, bird. If we wanted to use cat somewhere on our page, we would use [meltglossify:glossary:cat]. Drupal would then compile that token into <abbr title="Definition of a cat">cat</abbr>.

The title on the <abbr> tag gets pulled from the Description field from the taxonmy term. If no description is available, it just falls back to the term name without being wrapped in an abbr tag.

Settings for customizing Tippy.js tooltip

A settings page has been created at: admin/config/melt_glossify/settings.

You'll be able to:

  1. Use YAML for options passed to the tippy(options) instance.
  2. Color the background and arrow of the tooltip