Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/control-panel/field-manager/field-manager-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,15 @@ Fields have the following settings:

**Control Panel Location: `Developer > Fields > Field Groups > New/Edit Field Group`**

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).
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).

The field group details and assigned fields can be edited by clicking pencil icon next to field group name.

Clicking on the group name will show the list of fields assigned to this group.

Fields groups have following properties:

- **Name** -- Name of field group displayed in Control Panel
- **Short Name** -- The short name of field group, used in Fluid fields when looping through the group's fields
- **Description** -- Description of field group
- **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).
80 changes: 78 additions & 2 deletions docs/fieldtypes/fluid.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@ Fluid fields give the author control over the structure of their content, while

Select all fields that you want available in your fluid field on the publish page. All native fieldtypes except another fluid field are available.

### Custom field groups

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.

## Publish Page

### Add

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.
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.

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

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.
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.

The frontend will output the various field contents in the order specified in the entry.

NOTE: **Note:** Conditional fields are not supported inside Fluid

## Channel Form

A fluid field cannot be used in the channel form.
Expand All @@ -53,6 +61,24 @@ For example, if you have a Fluid field `fluid_content` with a text field `fluid_

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.

Displaying field groups from within Fluid field is sligtly different, as it requires additions `{fields}` tag pair.
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:

{fluid_content}

{fluid_content:blog}
{fields}
{fluid_content:fluid_header}
<h3>{content}</h3>
{/fluid_content:fluid_header}
{fluid_content:fluid_text}
<div>{content}</div>
{/fluid_content:fluid_text}
{/fields}
{/fluid_content:blog}

{/fluid_content}

## Variables

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"}}`
Expand Down Expand Up @@ -149,6 +175,56 @@ Alias of `:current_fieldtype`.

The total number of fields regardless of tag output criteria.

Additionally, the following variable are available when using custom field groups:

### `first_group`

{fluid_content:first_group}

True, if the current field group is the first one.

### `last_group`

{fluid_content:first_group}

True, if the current field group is the last one.

### `current_group_name`

{fluid_content:current_group_name}

The "human" name of the current field group being processed.

### `current_group_short_name`

{fluid_content:current_group_short_name}

The short name of the current field group being processed (as used in the templates).

### `next_group_name`

{fluid_content:next_group_name}

The "human" name of the next field group. This will be blank when on the last group.

### `next_group_short_name`

{fluid_content:next_group_short_name}

The short name of the next field group. This will be blank when on the last group.

### `prev_group_name`

{fluid_content:prev_group_name}

The "human" name of the previous field group. This will be blank when on the first group.

### `prev_group_short_name`

{fluid_content:prev_group_short_name}

The short name of the previous field group. This will be blank when on the first group.

## Displaying a Pair variable

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.
Expand Down