Plone backend add-on to define a glossary and provide tooltips on matching text.
- The terms are defined as title / definition pairs.
- The term can have variants.
- The definiton is richtext formated.
- The tooltip can be disabled in glossary control panel.
- Tooltips can be restricted to a selection of content types.
- REST API service @glossary_terms to fetch the terms of a glossary.
@rohberg/volto-slate-glossary is the corresponding Volto add-on.
Volto fetches @tooltip_terms on every page view, while the terms rarely change.
Both REST API services, @tooltip_terms and @glossary_terms, therefore use the caching ruleset Glossary terms (collective.glossary.terms) of plone.app.caching.
When plone.app.caching is installed, installing or upgrading collective.glossary maps this ruleset to Terse caching, with these settings:
| Setting | Value | Header |
|---|---|---|
| Maximum age | 10 seconds | max-age=10 |
| Shared maximum age | 300 seconds | s-maxage=300 |
| Only cache for anonymous users | Yes | max-age=0, must-revalidate, private for logged-in users |
| Vary | Accept, Authorization, Origin |
Vary: Accept, Authorization, Origin for anonymous visitors |
A caching proxy such as Varnish then keeps the answers for anonymous visitors for up to 5 minutes.
An answer for a logged-in user may contain unpublished terms, so caching proxies do not store it, and the browser fetches it again each time.
Origin in Vary keeps the answers for the different origins of a CORS policy apart.
Change the settings in Site Setup > Caching, on the Caching operations tab, for the Glossary terms ruleset.
The upgrade to profile version 7 sets Only cache for anonymous users and an empty Vary for the operation the Glossary terms ruleset is mapped to. It keeps the operation, the maximum ages, and a Vary you entered.
Installing or upgrading collective.glossary with plone.app.caching installed adds Term to the content types to purge.
When plone.app.caching purges a caching proxy, changing, publishing, retracting, or deleting a term purges @tooltip_terms and @glossary_terms of its glossary and of every folder above it up to the site, with and without /++api++.
Moving or renaming a term, its glossary, or a folder above it purges these answers at the old and at the new place.
Without purging, a changed term reaches visitors within 5 minutes.
These changes are not purged and reach visitors within 5 minutes:
- answers requested with a query string;
- a new or copied term, until a workflow transition follows; with the usual workflows a term becomes visible by publishing it, which purges;
- changes in the glossary control panel, which
@glossary_termsreports.
A login that sends no Authorization header, such as the cookie login of Classic UI, does not take part in Vary.
A caching proxy may answer such a user with the version for anonymous visitors, which lacks unpublished terms but reveals nothing.
Installed plone.app.caching after collective.glossary?
Apply the collective.glossary:caching profile in the ZMI, under portal_setup > Import, or map the Glossary terms ruleset yourself in the caching control panel.
Without a mapping, the services send no Cache-Control header, and caching proxies do not cache them.
Create a Glossary.
Use it!
Configure glossary settings in the control panel.
- An operating system that runs all the requirements mentioned.
- uv
- Make
- Git
- Docker (optional)
-
Clone this repository, then change your working directory.
git clone git@github.com:collective/collective.glossary.git cd collective.glossary -
Install this code base.
make install
The project is licensed under GPLv2.
Generated using Cookieplone (0.9.7) and cookieplone-templates (c7497ac) on 2025-06-25 15:56:13.999992.


