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
Copy file name to clipboardExpand all lines: docs/fieldtypes/fluid.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,8 +61,8 @@ For example, if you have a Fluid field `fluid_content` with a text field `fluid_
61
61
62
62
The prefixed tag pair is a looping tag pair. You can have more than one `fluid_text` field for the entry, it's entirely at the entry author's discretion. The author also determines the order of the field output.
63
63
64
-
Displaying field groups from within Fluid field is slightly different, as it requires additions`{fields}` tag pair.
65
-
So given that `blog` is the short name of custom field group and `fluid_header` and `fluid_text` are fields in that group, the template might look like:
64
+
Displaying field groups from within Fluid field is slightly different, as it uses a`{fields}` tag pair to loop through fields within the field group. The order of fields within the loop defaults to the same order of the fields within the field group. You may reverse this order by using `{fields order="desc"}` or specify a different order with `{fields fixed_order="field_2|field_1"}`.
65
+
So given that `blog` is the short name of our custom field group and `fluid_header` and `fluid_text` are fields in that group, the template might look like:
66
66
67
67
{fluid_content}
68
68
@@ -79,6 +79,18 @@ So given that `blog` is the short name of custom field group and `fluid_header`
79
79
80
80
{/fluid_content}
81
81
82
+
ExpressionEngine 7.5 introduces the ability to access fields from a field group without the use of a `{fields}` loop.
83
+
The field name must be prefixed by the group's short_name and placed within the group tag like this:
84
+
85
+
{fluid_content}
86
+
87
+
{fluid_content:blog}
88
+
<h3>{blog:fluid_header}</h3>
89
+
<div>{blog:fluid_text}</div>
90
+
{/fluid_content:blog}
91
+
92
+
{/fluid_content}
93
+
82
94
## Variables
83
95
84
96
TIP: **Tip:** When using any of these [tags with a parameter in a conditional](templates/conditionals.md#embedding-tags) you will have to wrap them in braces (`{}`), like so: `{if {fluid_content:first name="text_body"}}`
@@ -181,13 +193,13 @@ Additionally, the following variable are available **when using custom field gro
181
193
182
194
{fluid_content:count_in_group}
183
195
184
-
The "count" out of the fields being displayed in a field group. If five fields are in a group, then for the fourth field the `count` variable would have a value of "4".
196
+
The "count" out of the fields being displayed in a field group. If five fields are in a group, then for the fourth field the `count` variable would have a value of "4".
185
197
186
198
### `first_in_group`
187
199
188
200
{fluid_content:first_in_group}
189
201
190
-
True, if the current field is the first one in the current field group.
202
+
True, if the current field is the first one in the current field group.
191
203
192
204
### `index_in_group`
193
205
@@ -441,7 +453,7 @@ Radio and single select fields use single variables:
0 commit comments