Linked schema matching rules
Look up how Studio auto-binds a section you drop on a template, and why a section binds to one field, several, or none. To change what a placed section reads from, use Section Data. See Change what a placed section reads from.
The example on this page is a Blog post content type. It has an author_card global field with three fields: name (text), role (text) and photo (file). It also has an author reference field that points to the Author content type, and a related_posts reference field that points to Blog post. The Author card section is linked to the author_card field on Blog post.
When Studio auto-binds a section
Studio auto-binds a section when you drop it on a connected template. A freeform template has no content type to match against, so a section on it has no data until you pick one in Section Data.
| Step | What Studio checks |
|---|---|
| 1 | The section has a linked schema whose content type is the template's connected content type. |
| 2 | If that linked schema is Entire Content Type, the section binds to the whole entry. |
| 3 | If that linked schema is a field, Studio looks for fields of the same shape at the drop location. |
| 4 | If no linked schema is the template's content type, Studio tries the reference field rules. See Sections linked through a reference field. |
Studio doesn't link a section to other content types for you, even when they use the same global field. The Author card section binds on a Topic page template only if you also link it to author_card on Topic page.
Which field the section binds to
| Case | What Studio binds |
|---|---|
| The linked schema is Entire Content Type and you drop the section at the root of the template | The whole template entry. |
| The linked schema is Entire Content Type and you drop the section inside a Repeater over a reference to that content type | Each referenced entry. |
| The linked field exists at the drop location | That field. Other fields of the same shape are offered as alternatives in Section Data. |
| The linked field isn't at the drop location, but other fields match its shape | The first matching field, in schema order. The rest are alternatives. |
| Nothing matches | Nothing. Pick the section's data in Section Data. |
For the Author card section on the Blog post template, author_card exists, so the section binds to it. If Blog post also had a guest_author_card field using the same global field, that field would be offered as an alternative.
When two fields have the same shape
Two fields match only when they have the same data type and the same Multiple setting. A single field never matches a multiple one, even when everything else agrees. After that, each field type has its own rule.
| Field type | They match when | Example |
|---|---|---|
| Group or global field | They have the same number of direct child fields, and the same data types among them, in any order. Field names don't matter. | author_card (text, text, file) matches a group with title (text), image (file) and subtitle (text). |
| Modular blocks | They share at least one block UID. | Blocks quote and image match blocks quote and video. |
| Reference | They share at least one referenced content type. | A reference to Author matches a reference to Author and Editor. |
| Any other field, such as text, number or file | Data type and Multiple agree. There's nothing else to compare. |
Only direct children count. A group inside a group is compared by its data type, not by what's inside it.
For a multiple field, Studio also accepts a looser match when nothing matches exactly. A multiple field matches if every one of its child data types is also among the section's child data types. The section's other fields read as empty.
What a section matches inside a Repeater or modular block
Studio matches against the fields available where you drop the section, not only the template's top-level fields.
| Drop location | Fields Studio matches against |
|---|---|
| The root of the template | The top-level fields of the connected content type |
| Inside a Repeater over a group or global field | The fields of that group or global field |
| Inside a Repeater over a modular blocks field | The fields of all its blocks together. Where two blocks have a field with the same UID, the first one counts. |
| Inside a Condition Block narrowed to one block | The fields of that block |
| Inside a Repeater over a reference field with one referenced content type | The fields of that content type |
| Inside a Repeater over a reference field with several referenced content types | None, so the section isn't auto-bound |
When the repeated item has the same shape as the section's linked field, the section binds to the item itself, with no field in between. Say a Blog post has a multiple group authors, whose fields are two text fields and a file. The Author card section dropped inside a Repeater over authors binds to each item, and repeats once per author. This works only when the section's linked field isn't multiple.
How field names are mapped
When the section binds to a field whose child fields have different names, Studio maps them by position. It pairs the first child with the first child, the second with the second, and so on. A pair is mapped only when both have the same data type.
Section field author_card | Template field byline | Mapped |
|---|---|---|
name (text) | title (text) | Yes |
role (text) | subtitle (text) | Yes |
photo (file) | image (file) | Yes |
This has two effects.
- Order matters for values. Fields match in any order, but values carry over only for positions where the data types line up. If
bylineheldtitle(text),image(file),subtitle(text), it would still match, butroleandphotowould read as empty. - The mapping is one level deep. A group inside the linked field must have the same UID on both sides, and a modular block must have the same block UID on both sides. Otherwise the data inside it doesn't render.
To avoid both, use the same global field on every content type the section works with. The shapes are then identical and nothing needs mapping.
Sections linked through a reference field
When none of the section's linked schemas is the template's content type, Studio still auto-binds in these cases.
| The section is linked to | Studio binds it to |
|---|---|
| A reference field on another content type | A reference field at the drop location that shares at least one referenced content type. The first one wins. The rest are alternatives. |
| Entire Content Type of another content type, and has Repeaters over that content type's reference fields | The template's reference fields that share a referenced content type with those Repeaters |
Say a Related posts section is linked to a reference field on a Landing page content type, and that field points to Blog post. When you drop the section on the Blog post template, it binds to related_posts, because both fields point to Blog post.
Change what a placed section reads from
Select the placed section and open Section Data in the Settings panel. It offers the alternatives auto-binding found, and more. It also accepts a field that has everything the section needs plus extra fields. When the template has Pinned Entries and Pinned Queries, it offers those too. You can't pick anything that doesn't fit the section's shape.
Studio stores your choice on that placement in the template. Two placements of the same section on one template can read from different fields. Once you choose, Studio keeps your choice instead of recalculating it.
What auto-binding doesn't do
| It doesn't | What to do instead |
|---|---|
| Bind a section on a freeform template | Pick its data in Section Data. |
| Match across content types through a shared global field | Link the section to that field on each content type. |
| Map field names inside a nested group or block | Keep nested UIDs the same, or use one global field everywhere. |
| Accept a group with extra or missing fields | Pick the field in Section Data, which accepts a field that has everything the section needs. |
| Auto-bind a Section more than 3 references deep, or a Section inside a Section more than 2 levels deep | Pick the section's data in Section Data. The limit is on automatic binding, not on picking a field. |
Where to go next
- Why a shared global field makes one section work on many templates: Your content model in Studio.
- Link a section to a schema: Build sections.
- Repeat a section over a list: Render a list.