Skip to main content

Implementing common use cases

Several common use cases for References include:
  • Page Facets for grouping/filtering
  • Reusable promotional page content
  • Tables of related content
Explore the tabs below to learn how to configure your content for each of these use cases in your ButterCMS dashboard, as well as how to fetch content from the API.
You can use Collections as Facets (filterable properties) for your Pages. The simplest example would be to add Categories to your Pages.Category Collection exampleCategory Collection exampleCategory Collection configurationAdd categories to your Collection:Adding categoriesAdding categoriesAdding Reference fieldAdding Reference fieldAPI Response with Category:
{
  "data": {
    "slug": "martini",
    "fields": {
      "name": "Martini",
      "image": "https://cdn.buttercms.com/martini.jpg",
      "category": {
        "name": "Martini",
        "slug": "martini"
      }
    }
  }
}
Filtering by Category:
GET https://api.buttercms.com/v2/content/cocktails/?fields.category.slug=martini