Multi-reference field

 

A multi-reference field is just like a reference field, except it allows you to reference more than one item from another Collection and then present these items in a Collection List on a Collection Page. This is great for tagging systems and other instances where you want to connect one item to many others.

Common uses
  • Blog post Collection referencing multiple authors from an Authors Collection
  • Projects Collection referencing multiple tags in a Tags Collection
In this lesson
  • Creating a multi-reference field
  • Referencing items
  • Using the multi-reference field in your design

Creating a multi-reference field

The beauty of the reference and multi-reference fields is that whenever you edit an item that’s being referenced, the new content will automatically update everywhere it’s referenced.

So, for example, if I updated a related blog post's name, every reference to that blog post will update automatically.

To add a multi-reference field to a Collection, click New Field and then choose the multi-reference field.

Choose a Collection to reference

In multi-reference field’s settings, you can choose which Collection you want the current Collection to reference.

 

Other field settings

You can also specify the name, help text, and whether the field is required to publish.

Need to know
You get a limited number of references per Collection. Check out the features list to learn more.

Referencing items

Once you've added a multi-reference field to a Collection, you can go into your Collection items and start adding references. You can choose multiple items from the Collection you chose in the reference field settings.

 

Using the multi-reference field in your design

To use multi-reference fields in your designs, connect a Collection List to this field in a Collection Page that has that field. You can then connect to elements and styles inside this Collection List.

Connecting to a Collection List

In this example we have a Blog Posts Collection with a multi-reference field that’s referencing the Tags Collection. Drop a Collection list onto the Blog Post Collection page, and connect it to the Tags multi-reference field.

Must know
  • ‍Make sure you connect to the multi-reference field and not the actual Collection that is referenced. If you connect to the actual collection, that will pull all the Collection items in that collection instead of only the referenced ones.
Good to know
There’s no filtering options for this Collection list because it automatically shows the referenced items for that page.
Also, there’s no sorting options for a Collection list that's connected to a multi-reference field. That's because it automatically shows the referenced items in the order that you've selected them within the multi-reference field.
Must know
At the moment, you can show Multi-reference field values only on a Collection page, and not within a Collection list. Support for nested Collection lists is planned. Vote for and subscribe to status updates of this feature request.

Connecting elements and styles

When you add an element to this Collection List, you can pull the content for that element from any of the referenced Collection’s fields. For example, you can use a tag’s name in a heading element and the tag’s icon in an image element.

 

In this clip, we show you how you can pull the values of a number of fields from a Contributors Collection right into a Blog Post.

Filtering a Collection list using the multi-reference field

You can filter a Collection list using the Multi-reference field only on the referenced Collection page. For example, on the Tags Collection Page, you can show all Blog Posts that reference that Tag. To do this:

  1. Add a Collection list and connect it to the Blog Posts Collection
  2. Create a Collection list filter with the Tags (multi-reference), contains, Current Tag.
Learn more about Collection list filters.