Skip to content

Commit 969b0e0

Browse files
committed
update content relatioship
1 parent cb791cd commit 969b0e0

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

content/docs/content-creation/fields.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Fields
33
slug: content-creation/fields
44
description: null
55
date: 2022-03-14T08:42:21.626Z
6-
lastmod: 2023-08-21T09:19:31.587Z
6+
lastmod: 2023-09-12T18:17:25.997Z
77
weight: 200.2
88
---
99

@@ -778,8 +778,11 @@ instance be used to reference an author, or a related blog post.
778778

779779
- `contentTypeName`: The name of the content-type to link.
780780
- `contentTypeValue`: The type of link/value you want to add. This can be `slug`, or `path`.
781+
- `multiple`: Specify if you want to select one or multiple relationships (optional).
781782

782-
```json {{ "title": "Usage" }}
783+
#### Example 1
784+
785+
```json {{ "title": "Usage of single selection" }}
783786
{
784787
"title": "Session",
785788
"name": "session",
@@ -789,12 +792,33 @@ instance be used to reference an author, or a related blog post.
789792
}
790793
```
791794

792-
```yaml {{ "title": "Outcome" }}
795+
```yaml {{ "title": "Outcome of single selection" }}
793796
---
794797
session: /session-slug/
795798
---
796799
```
797800

801+
#### Example 2
802+
803+
```json {{ "title": "Usage of multi-selection" }}
804+
{
805+
"title": "Session",
806+
"name": "session",
807+
"type": "contentRelationship",
808+
"contentTypeName": "session",
809+
"contentTypeValue": "slug",
810+
"multiple": true
811+
}
812+
```
813+
814+
```yaml {{ "title": "Outcome of multi-selection" }}
815+
---
816+
session:
817+
- /session1-slug/
818+
- /session2-slug/
819+
---
820+
```
821+
798822
## customField
799823

800824
The `customField` field type allows you to create and add your own fields to render.

0 commit comments

Comments
 (0)