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
+64-1Lines changed: 64 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,7 @@ In this example, the Fluid field has short name `news_content` with a file field
243
243
244
244
## Displaying Multiple Fields
245
245
246
-
Fluid fields are most useful when multiple fields may be included in the presentation. For example, you want to give your client the flexibility to add content in a number of styles. There's a text field `{full_text}`, a grid field `{img_card}` to hold a varying number of small images with descriptive text, a relationship field `{featured_entry}` where they can set a featured article.
246
+
Fluid fields are most useful when multiple fields may be included in the presentation. For example, you want to give your client the flexibility to add content in a number of styles. There's a text field `{full_text}`, a grid field `{img_card}` to hold a varying number of small images with descriptive text, a relationship field `{featured_entry}` where they can set a featured article and an SEO `seo_group`**field group** containing multiple fields related to meta data.
247
247
248
248
A fluid field can handle the output of all of those fields, as many as they add, respecting the order they specify when publishing.:
249
249
@@ -277,6 +277,17 @@ A fluid field can handle the output of all of those fields, as many as they add,
277
277
</div>
278
278
{/fluid_field:featured_entry}
279
279
280
+
{fluid_field:seo_group}
281
+
{fields}
282
+
{fluid_field:seo_title}
283
+
<title>{content}</title>
284
+
{/fluid_field:seo_title}
285
+
{fluid_field:seo_description}
286
+
<meta name="description" content="{content}">
287
+
{/fluid_field:seo_description}
288
+
{/fields}
289
+
{/fluid_field:seo_group}
290
+
280
291
{/fluid_field}
281
292
```
282
293
@@ -429,3 +440,55 @@ Radio and single select fields use single variables:
429
440
<a href="{content}">Your Link</a>
430
441
{/my_fluid_field:my_url}
431
442
{/my_fluid_field}
443
+
444
+
## Field Group Examples
445
+
446
+
Field groups in fluid work exactly like fields do, with one extra tag pair ``{fields}...{/fields}`` required.
447
+
448
+
### Field Group with Date and Email fields
449
+
450
+
{my_fluid_field}
451
+
{my_fluid_field:my_field_group}
452
+
{fields}
453
+
454
+
{my_fluid_field:my_date}
455
+
{content format="%F %d %Y"}
456
+
{/my_fluid_field:my_date}
457
+
458
+
{my_fluid_field:my_email}
459
+
{content:mailto title="Email about their dog" subject="Question about your dog" encode="no"}
0 commit comments