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/control-panel/field-manager/field-manager-settings.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,4 +40,15 @@ Fields have the following settings:
40
40
41
41
**Control Panel Location: `Developer > Fields > Field Groups > New/Edit Field Group`**
42
42
43
-
This section allows you to create and edit field groups. Field Groups are collections of fields which can then be related to one or more [Channels](control-panel/channels.md#fields-tab).
43
+
This section allows you to create and edit field groups. Field Groups are collections of fields which can then be related to one or more [Channels](control-panel/channels.md#fields-tab) as well as used in [Fluid fields](fieldtypes/fluid.md).
44
+
45
+
The field group details and assigned fields can be edited by clicking pencil icon next to field group name.
46
+
47
+
Clicking on the group name will show the list of fields assigned to this group.
48
+
49
+
Fields groups have following properties:
50
+
51
+
-**Name** -- Name of field group displayed in Control Panel
52
+
-**Short Name** -- The short name of field group, used in Fluid fields when looping through the group's fields
53
+
-**Description** -- Description of field group
54
+
-**Fields** -- The fields can be reordered by drag and drop, and the fields order will be respected on [Entry Publish page](control-panel/create.md) (unless [Publish Layouts](control-panel/channels.md#publish-layouts) are used) as well as in [Fluid field custom field groups](fieldtypes/fluid.md#custom-field-groups).
Copy file name to clipboardExpand all lines: docs/fieldtypes/fluid.md
+78-2Lines changed: 78 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,16 +23,24 @@ Fluid fields give the author control over the structure of their content, while
23
23
24
24
Select all fields that you want available in your fluid field on the publish page. All native fieldtypes except another fluid field are available.
25
25
26
+
### Custom field groups
27
+
28
+
Select custom field groups to make them available to fluid field on the publish page. All fields in group will be displayed together in the order set on field group page.
29
+
26
30
## Publish Page
27
31
28
32
### Add
29
33
30
-
A fluid field is initially displayed as a simple dropdown 'Add', populated with the field names assigned to the fluid field. When you choose a field from the dropdown, it adds it to the page, maintaing all of the field's settings, instructions and requirements.
34
+
Each fluid field has list of buttons of available custom fields and custom field groups displayed below. Clicking on the button adds a field (or field group) to Fluid, maintaing all of the field's settings, instructions and requirements.
35
+
36
+
Also each Fluid row has '+' button, clicking which shows a dropdown populated with the field names assigned to the fluid field. When you choose a field from the dropdown, it adds it to the page
31
37
32
-
Fields can be used more than once and in any order. They can be re-ordered within the fluid field by dragging up or down.
38
+
Fields (or field groups) can be used more than once and in any order. They can be re-ordered within the fluid field by dragging up or down.
33
39
34
40
The frontend will output the various field contents in the order specified in the entry.
35
41
42
+
NOTE: **Note:** Conditional fields are not supported inside Fluid
43
+
36
44
## Channel Form
37
45
38
46
A fluid field cannot be used in the channel form.
@@ -53,6 +61,24 @@ For example, if you have a Fluid field `fluid_content` with a text field `fluid_
53
61
54
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.
55
63
64
+
Displaying field groups from within Fluid field is sligtly 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:
66
+
67
+
{fluid_content}
68
+
69
+
{fluid_content:blog}
70
+
{fields}
71
+
{fluid_content:fluid_header}
72
+
<h3>{content}</h3>
73
+
{/fluid_content:fluid_header}
74
+
{fluid_content:fluid_text}
75
+
<div>{content}</div>
76
+
{/fluid_content:fluid_text}
77
+
{/fields}
78
+
{/fluid_content:blog}
79
+
80
+
{/fluid_content}
81
+
56
82
## Variables
57
83
58
84
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"}}`
@@ -149,6 +175,56 @@ Alias of `:current_fieldtype`.
149
175
150
176
The total number of fields regardless of tag output criteria.
151
177
178
+
Additionally, the following variable are available when using custom field groups:
179
+
180
+
### `first_group`
181
+
182
+
{fluid_content:first_group}
183
+
184
+
True, if the current field group is the first one.
185
+
186
+
### `last_group`
187
+
188
+
{fluid_content:first_group}
189
+
190
+
True, if the current field group is the last one.
191
+
192
+
### `current_group_name`
193
+
194
+
{fluid_content:current_group_name}
195
+
196
+
The "human" name of the current field group being processed.
197
+
198
+
### `current_group_short_name`
199
+
200
+
{fluid_content:current_group_short_name}
201
+
202
+
The short name of the current field group being processed (as used in the templates).
203
+
204
+
### `next_group_name`
205
+
206
+
{fluid_content:next_group_name}
207
+
208
+
The "human" name of the next field group. This will be blank when on the last group.
209
+
210
+
### `next_group_short_name`
211
+
212
+
{fluid_content:next_group_short_name}
213
+
214
+
The short name of the next field group. This will be blank when on the last group.
215
+
216
+
### `prev_group_name`
217
+
218
+
{fluid_content:prev_group_name}
219
+
220
+
The "human" name of the previous field group. This will be blank when on the first group.
221
+
222
+
### `prev_group_short_name`
223
+
224
+
{fluid_content:prev_group_short_name}
225
+
226
+
The short name of the previous field group. This will be blank when on the first group.
227
+
152
228
## Displaying a Pair variable
153
229
154
230
Fields that use a variable pair to output content work like they would outside of a Fluid field, with the the `{content}` variable taking the place of the field shortname.
0 commit comments