You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggesting to have unique fieldnames in collections in the examples in the docs, related to bolt/core#3386
There may be more instances in the docs where this can apply.
Copy file name to clipboardExpand all lines: docs/fields/collection.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,12 @@ along with the definition of the sub fields under the `fields` key.
19
19
features:
20
20
type: collection
21
21
fields:
22
-
title:
22
+
featuretitle:
23
23
type: text
24
-
image:
24
+
featureimage:
25
25
type: image
26
26
extensions: [ gif, jpg, png ]
27
-
content:
27
+
featurecontent:
28
28
type: html
29
29
```
30
30
@@ -78,7 +78,7 @@ fields from the collection by name or by type. Because of the nature of a Collec
78
78
In that light, it's usually good practice to always use a for loop to iterate over them. The examples below will grab the fields named `content` or all of the `type: text` fields. We do this with Twig's [`filter` filter][filter]
79
79
80
80
```twig
81
-
{% for feature in record.features|filter(feature => feature.name == 'content') %}
81
+
{% for feature in record.features|filter(feature => feature.name == 'featurecontent') %}
82
82
{{ feature }}
83
83
{% endfor %}
84
84
@@ -114,12 +114,12 @@ The field has three specific options:
114
114
limit: 3
115
115
collapsible: false
116
116
fields:
117
-
title:
117
+
featuretitle:
118
118
type: text
119
-
image:
119
+
featureimage:
120
120
type: image
121
121
extensions: [ gif, jpg, png ]
122
-
content:
122
+
featurecontent:
123
123
type: html
124
124
```
125
125
@@ -134,23 +134,23 @@ The field has three specific options:
134
134
features:
135
135
type: collection
136
136
fields:
137
-
title:
137
+
featuretitle:
138
138
type: text
139
-
content:
139
+
featurecontent:
140
140
type: html
141
-
image:
141
+
featureimage:
142
142
type: image
143
143
default:
144
144
0:
145
-
field: title
145
+
field: featuretitle
146
146
default: "Lets start with a title"
147
147
1:
148
-
field: image
148
+
field: featureimage
149
149
default:
150
150
filename: "kitten.jpg"
151
151
alt: "Picture of a kitten"
152
152
2:
153
-
field: content
153
+
field: featurecontent
154
154
default: "<strong>Finish strong</strong> after the kitten with some content"
0 commit comments