diff --git a/docs/channels/fields.md b/docs/channels/fields.md new file mode 100644 index 000000000..8849d0417 --- /dev/null +++ b/docs/channels/fields.md @@ -0,0 +1,80 @@ + + +# Channel Field Tag + +[TOC] + +## Overview + +`{exp:channel:field}` tag allows displaying properties of [channel field](control-panel/field-manager/edit-field.md) irrespective of the context. + + {exp:channel:field field_name="department"} +
+

Choose {field_label}:

+ {field_options} +

{value}: {label}

+ {/field_options} +
+ {/exp:channel:field} + +## Parameters + +### `field_id=` + + field_id="2" + +Specify field ID. It is required to have either field_id or field_name parameter. If both are specified, field_id will be used. + +### `field_name=` + + field_name="body" + +Specify field name. It is required to have either field_id or field_name parameter. + +### `site_id=` + + site_id="2" + +By default, the tag is looking for fields that are set up for current MSM site. If you need to display properties of field that belongs to other MSM site, you need to specify site_id parameter. + + +## Variables + +[TOC=3] + +### `{field_id}` + +Field ID + +### `{field_name}` + +Field name + +### `{field_label}` + +Field label + +### `{field_instructions}` + +Field instructions for the CP + +### `{field_type}` + +Field type + +### `{field_options}` + +Tag pair that contains possible field options. It is used for fields like Radio Buttons, Checkboxes, Select Dropdown, etc. + +Inside the tag pair you can use `{value}` and `{label}` variables: + + {field_options} + {value} / {label} + {/field_options} \ No newline at end of file diff --git a/docs/toc_sections/_the_fundamentals_toc.yml b/docs/toc_sections/_the_fundamentals_toc.yml index 18effcaef..80f7dad36 100644 --- a/docs/toc_sections/_the_fundamentals_toc.yml +++ b/docs/toc_sections/_the_fundamentals_toc.yml @@ -211,6 +211,8 @@ href: channels/channel-form/categories.md - name: Development href: channels/channel-form/development.md + - name: Channel Field Properties + href: channels/fields.md #If you update fieldtypes besure to update listing on fieldtypes/overview page. - name: Fieldtypes @@ -313,4 +315,3 @@ href: comment/subscriptions.md - name: Control Panel href: comment/control-panel.md -