Collection

Allows you attach other Entries to your content. Related entries, read-next lists, and other useful content relationships can all be accomplished here.


Preview

Collection Fieldtype

Usage

This fieldtype is used to view a list of Entries from one or more Collections, much like a “Related Articles” use case.

fields:
  my_collection_field:
    display: Related Articles
    type: collection
    collection: blog

Data Structure

The Collections fieldtype is a Relate fieldtype, which means the Entries will be saved asĀ IDs.

shows:
  - 892jfsd9a90as
  - 134jk1h78dfas

Templating

Use the Relate tag to loop through the IDs and fetch the content data.

<ul>
  {{ relate:shows }}
    <li>{{ title }}</li>
  {{ /relate:shows }}
</ul>
<ul>
  <li>Arrested Development</li>
  <li>Parks and Recreation</li>
</ul>

Settings

This fieldtype supports the following settings in addition to the settings available in the Relate fieldtype.

collection

string

The name of the collection to Fetch entries from.

Last modified on March 20, 2018