Create a Glossary Powered by Collections

Have several terms or phrases you want to ensure are easy for customers to look up? Good news, You can leverage Collection Items to create a glossary of terms. Doing so enables users to search different phrases housed within ButterCMS and keeps all of your website content in one place.

To get started, curate a list of terms, products, phrases, or other similar content such as a glossary-like feature for your site. Then use the following steps to create a glossary: 

Step 1: Create a collection schema

This schema will serve as a template to house the list of terms and their corresponding definitions. The schema we choose to use is very basic and captures just the term and the definition. The schema can be adjusted to include other field types. For our example, we used the following: 

  • Short Text Field to showcase the term we wish to define
  • Long Text Field to house the term definition

Title this collection "Glossary".

Step 2: Populate the collections.

Start adding each of your list of terms and definitions as individual collection items. Each entry should be its own collection item using the Glossary schema we made in step one. 

Depending on the size of your project, utilizing the write API function is a great tool that can help expedite this process and ensure the collections in Butter are up to date and in sync with an internal database that might be housing these terms.

Here are some articles with more information on this:

Step 3: Reference the collection items

To display the glossary you've created you can use our API documentation to reference your content programmatically or by using a reference field type. Below you will see an example of using a reference field type to reference the glossary on a page.

Alternative Approaches:

Instead of using Collection Items to house your terms and corresponding definitions, you can also use a page with a repeater to accomplish this.

Still have a question?

Our Customer Success team is standing by to help.