field.inline.fal ViewHelper <flux:field.inline.fal>
Creates a FAL IRRE field
To get the file references, assigned with that field in a flux form, you will have to use EXT:vhs but there are two different ViewHelpers for fluidpages templates and fluidcontent elements.
Example how to get the first file reference from a fluidcontent element, for the flux field named "settings.files":
- {v:content.resources.fal(field: 'settings.files')
- -> v:iterator.first() -> v:variable.set(name: 'settings.files')}
And now the example how to get the first file reference from a fluidpages template, for the flux field named "settings.files":
- {v:page.resources.fal(field: 'settings.files')
- -> v:iterator.first() -> v:variable.set(name: 'settings.files')}
Usage warning
Due to [TYPO3 core bug #71239](https://forge.typo3.org/issues/71239), using
FAL references within sections (<flux:
) in content elements
or within the page configuration does not work.
When choosing a file in one section element, you will see it in all sections. When choosing a file in a page configuration, it will be visible in the subpages configuration, too.
This issue will most likely not be fixed before TYPO3 8, so do not use it.
Alternatively, you could use <flux:
.
Selecting and rendering an image
Selecting a single image
<flux:field.inline.fal name="settings.image" required="1" maxItems="1" minItems="1"/>
Define crop variants
- <flux:field.inline.fal name="settings.slides" required="1" maxItems="10" minItems="1" cropVariants="{
- default: {
- title: 'Default', allowedAspectRatios: { default: { title: '1200:450', value: '2.6666666666' } }
}
}"/>
The crop configuration can now be passed to the image viewhelper:
- <f:section name="Main">
- <f:for each="{v:content.resources.fal(field: 'settings.slides')}" as="image" iteration="iterator">
- <f:image src="{image.uid}" height="300" class="leb-pic" crop="{image.crop}" cropVariant="default"/>
</f:for>
</f:section>
Rendering the image
{v:content.resources.fal(field: 'settings.image') -> v:iterator.first() -> v:variable.set(name: 'image')} <f:image treatIdAsReference="1" src="{image.uid}" title="{image.title}" alt="{image.alternative}"/><br/>
Rendering multiple images
- <f:for each="{v:content.resources.fal(field: 'settings.image')}" as="image">
- <f:image treatIdAsReference="1" src="{image.uid}" title="{image.title}" alt="{image.alternative}"/><br/>
</f:for>
Arguments
name
- DataType
- string
- Required
- true
- Description
- Name of the attribute, FlexForm XML-valid tag name string
label
- DataType
- string
- Required
- false
- Description
- Label for the attribute, can be LLL: value. Optional - if not specified, Flux tries to detect an LLL label named "flux.fluxFormId.fields.foobar" based on field name, in scope of extension rendering the Flux form. If field is in an object, use "flux.fluxFormId.objects.objectname.foobar" where "foobar" is the name of the field.
default
- DataType
- string
- Required
- false
- Description
- Default value for this attribute
native
- DataType
- boolean
- Required
- false
- Description
- If TRUE, this field will treated as a native TCA field (requiring a matching SQL column). If the "name" of this field is an already existing field, that original field will be replaced by this field. If the field is a new field (which doesn't already exist in TCA). You can control where this field visually appears in the editing form by specifying the "position" argument, which supports the same syntax as TYPO3CMSCoreUtilityExtensionManagementUtility::addToAllTCAtypes (after:X before:X and replace:X). Note that when declaring a field as "native" it will no longer be rendered as part of the FlexForm where Flux fields are normally rendered.
position
- DataType
- string
- Required
- false
- Description
- Only applies if native=1. Specify where in the editing form this field should be, using the syntax of TYPO3CMSCoreUtilityExtensionManagementUtility::addToAllTCAtypes (after:X before:X and replace:X). Additionally, allows you to specify a TCA sheet if you want this field to be positioned in a dedicated sheet. Examples: position="after:header", position="replace:header", position="after:header My Sheet"
required
- DataType
- boolean
- Required
- false
- Description
- If TRUE, this attribute must be filled when editing the FCE
exclude
- DataType
- boolean
- Required
- false
- Description
- If TRUE, this field becomes an "exclude field" (see TYPO3 documentation about this)
transform
- DataType
- string
- Required
- false
- Description
- Set this to transform your value to this type - integer, array (for csv values), float, DateTime, VendorMyExtDomainModelObject or ObjectStorage with type hint.
enabled
- DataType
- boolean
- Default
- true
- Required
- false
- Description
- If FALSE, disables the field in the FlexForm
requestUpdate
- DataType
- boolean
- Required
- false
- Description
- If TRUE, the form is force-saved and reloaded when field value changes
displayCond
- DataType
- string
- Required
- false
- Description
- Optional "Display Condition" (TCA style) for this particular field. See: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html#displaycond
inherit
- DataType
- boolean
- Default
- true
- Required
- false
- Description
- If TRUE, the value for this particular field is inherited - if inheritance is enabled by the ConfigurationProvider
inheritEmpty
- DataType
- boolean
- Default
- true
- Required
- false
- Description
- If TRUE, allows empty values (specifically excluding the number zero!) to be inherited - if inheritance is enabled by the ConfigurationProvider
clear
- DataType
- boolean
- Required
- false
- Description
- If TRUE, a "clear value" checkbox is displayed next to the field which when checked, completely destroys the current field value all the way down to the stored XML value
protect
- DataType
- boolean
- Required
- false
- Description
- If TRUE, a "protect value" checkbox is displayed next to the field which when checked, protects the value from being changed if the (normally inherited) field value is changed in a parent record. Has no effect if "inherit" is disabled on the field.
variables
- DataType
- mixed
- Default
- array ()
- Required
- false
- Description
- Freestyle variables which become assigned to the resulting Component - can then be read from that Component outside this Fluid template and in other templates using the Form object from this template
extensionName
- DataType
- string
- Required
- false
- Description
- If provided, enables overriding the extension context for this and all child nodes. The extension name is otherwise automatically detected from rendering context.
config
- DataType
- mixed
- Default
- array ()
- Required
- false
- Description
- Raw TCA options - passed directly to "config" section of created field and overrides anything generated by the component itself. Can be used to provide options that Flux itself does not support, and can be used to pass root-level arguments for a "userFunc"
validate
- DataType
- string
- Default
- 'trim'
- Required
- false
- Description
- FlexForm-type validation configuration for this input
size
- DataType
- integer
- Default
- 1
- Required
- false
- Description
- Size of the selector box
multiple
- DataType
- boolean
- Required
- false
- Description
- If TRUE, allows selecting the same value multiple times
minItems
- DataType
- integer
- Required
- false
- Description
- Minimum required number of items to be selected
maxItems
- DataType
- integer
- Default
- 1
- Required
- false
- Description
- Maxium allowed number of items to be selected
itemListStyle
- DataType
- string
- Required
- false
- Description
- Overrides the default list style when maxItems > 1
selectedListStyle
- DataType
- string
- Required
- false
- Description
- Overrides the default selected list style when maxItems > 1 and renderType is SelectSingle
items
- DataType
- mixed
- Required
- false
- Description
- Items for the selector; array / CSV / Traversable / Query supported
emptyOption
- DataType
- mixed
- Required
- false
- Description
- If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property's value (cast to string) as label.
translateCsvItems
- DataType
- boolean
- Required
- false
- Description
- If TRUE, attempts to resolve a LLL label for each value provided as CSV in "items" attribute using convention for lookup "$field.option.123" if given "123" as CSV item value. Field name is determined by normal Flux field name conventions
itemsProcFunc
- DataType
- string
- Required
- false
- Description
- Function for serving items. See TCA "select" field "itemsProcFunc" attribute
table
- DataType
- string
- Default
- 'sys_file_reference'
- Required
- false
- Description
- Define foreign table name to turn selector into a record selector for that table
condition
- DataType
- string
- Required
- false
- Description
- Condition to use when selecting from "foreignTable", supports FlexForm
foreign_
markerstable_ where
mm
- DataType
- string
- Required
- false
- Description
- Optional name of MM table to use for record selection
foreignField
- DataType
- string
- Default
- 'uid_foreign'
- Required
- false
- Description
- The foreign_field is the field of the child record pointing to the parent record. This defines where to store the uid of the parent record.
foreignLabel
- DataType
- string
- Default
- 'uid_local'
- Required
- false
- Description
- If set, it overrides the label set in TCA[foreign_table]['ctrl']['label'] for the inline-view.
foreignSelector
- DataType
- string
- Default
- 'uid_local'
- Required
- false
- Description
- A selector is used to show all possible child records that could be used to create a relation with the parent record. It will be rendered as a multi-select-box. On clicking on an item inside the selector a new relation is created. The foreign_selector points to a field of the foreign_table that is responsible for providing a selector-box this field on the foreign_table usually has the type "select" and also has a "foreign_table" defined.
foreignSortby
- DataType
- string
- Default
- 'sorting_foreign'
- Required
- false
- Description
- Field on the child record (or on the intermediate table) that stores the manual sorting information.
foreignDefaultSortby
- DataType
- string
- Required
- false
- Description
- If a fieldname for
foreign_
is defined, then this is ignored. Otherwise this is used as the "ORDER BY" statement to sort the records in the table when listed.sortby
foreignTableField
- DataType
- string
- Default
- 'tablenames'
- Required
- false
- Description
- The field of the child record pointing to the parent record. This defines where to store the table name of the parent record. On setting this configuration key together with foreign_field, the child record knows what its parent record is - so the child record could also be used on other parent tables.
foreignUnique
- DataType
- string
- Required
- false
- Description
- Field which must be uniue for all children of a parent record.
symmetricField
- DataType
- string
- Required
- false
- Description
- In case of bidirectional symmetric relations, this defines in which field on the foreign table the uid of the "other" parent is stored.
symmetricLabel
- DataType
- string
- Required
- false
- Description
- If set, this overrides the default label of the selected
symmetric_
.field
symmetricSortby
- DataType
- string
- Required
- false
- Description
- Works like
foreign_
, but defines the field onsortby foreign_
where the "other" sort order is stored.table
localizationMode
- DataType
- string
- Default
- 'select'
- Required
- false
- Description
- Set whether children can be localizable ('select') or just inherit from default language ('keep').
disableMovingChildrenWithParent
- DataType
- boolean
- Required
- false
- Description
- Disables that child records get moved along with their parent records.
showThumbs
- DataType
- boolean
- Default
- true
- Required
- false
- Description
- If TRUE, adds thumbnail display when editing in BE
matchFields
- DataType
- mixed
- Default
- array ()
- Required
- false
- Description
- When using manyToMany you can provide an additional array of field=>value pairs that must match in the relation table
oppositeField
- DataType
- string
- Required
- false
- Description
- Name of the opposite field related to a proper mm relation
collapseAll
- DataType
- boolean
- Required
- false
- Description
- If true, all child records are shown as collapsed.
expandSingle
- DataType
- boolean
- Required
- false
- Description
- Show only one expanded record at any time. If a new record is expanded, all others are collapsed.
newRecordLinkAddTitle
- DataType
- boolean
- Default
- true
- Required
- false
- Description
- Add the foreign table's title to the 'Add new' link (ie. 'Add new (sometable)')
newRecordLinkPosition
- DataType
- string
- Default
- 'top'
- Required
- false
- Description
- Where to show 'Add new' link. Can be 'top', 'bottom', 'both' or 'none'.
useCombination
- DataType
- boolean
- Required
- false
- Description
- For use on bidirectional relations using an intermediary table. In combinations, it's possible to edit '
- . 'attributes and the related child record.
useSortable
- DataType
- boolean
- Default
- true
- Required
- false
- Description
- Allow manual sorting of records.
showPossibleLocalizationRecords
- DataType
- boolean
- Required
- false
- Description
- Show unlocalized records which are in the original language, but not yet localized.
showRemovedLocalizationRecords
- DataType
- boolean
- Required
- false
- Description
- Show records which were once localized but do not exist in the original language anymore.
showAllLocalizationLink
- DataType
- boolean
- Required
- false
- Description
- Show the 'localize all records' link to fetch untranslated records from the original language.
showSynchronizationLink
- DataType
- boolean
- Required
- false
- Description
- Defines whether to show a 'synchronize' link to update to a 1:1 translation with the original language.
enabledControls
- DataType
- mixed
- Required
- false
- Description
- Associative array with the keys 'info', 'new', 'dragdrop', 'sort', 'hide', delete' and 'localize'. '
- . 'Set either one to TRUE or FALSE to show or hide it.
headerThumbnail
- DataType
- mixed
- Required
- false
- Description
- Associative array with header thumbnail.
foreignMatchFields
- DataType
- mixed
- Required
- false
- Description
- The fields and values of the child record which have to match. For FAL the field/key is "fieldname" and the value has to be defined.
foreignTypes
- DataType
- mixed
- Required
- false
- Description
- Overrides the "types" TCA array of the target table with this array (beware! must be specified fully in order to work!). Expects an array of arrays; indexed by type number - each array containing for example a "showitem" CSV list value of field names to be shown when inline-editing the related record.
levelLinksPosition
- DataType
- string
- Default
- 'both'
- Required
- false
- Description
- Level links position.
allowedExtensions
- DataType
- string
- Required
- false
- Description
- Allowed File Extensions .
disallowedExtensions
- DataType
- string
- Required
- false
- Description
- Disallowed File Extensions .
createNewRelationLinkTitle
- DataType
- string
- Default
- 'LLL:EXT:lang/locallang_core.xlf:cm.createNewRelation'
- Required
- false
- Description
- Override label of "Create new relation" button.
cropVariants
- DataType
- mixed
- Required
- false
- Description
- Add one or multiple crop variants for uploaded images