Reputation: 249
Hello im trying to add additional option fields to my image they should be binded to the props anybody an idea how i can manage this issue? i have to access them by fileReference.caption if is it possible.
<f:section name="Configuration">
<flux:form id="tsi_seitenteaser" label="Slider" description="Zeigt den Seitenteaser an" options="{icon: '/typo3conf/ext/tsi_site/Resources/Public/Backend/img/Seitenteaser.png'}">
<flux:field.inline.fal name="SlideSideteaser" maxItems="30" allowedExtensions="jpg,png,svg" label="Slider Sideteaser"/>
<flux:field.input name="caption" label="Caption"/>
<flux:field.input name="text" label="Text"/>
</flux:form>
Upvotes: 0
Views: 713
Reputation: 4271
You cannot extend the TCA of sys_file_reference
via a Flux element, and that's what you would need to do in order to render those fields associated with each individual reference. Flux can do a lot of things, but it cannot do things that TYPO3 doesn't support and this would be one such thing (it's essentially the same as doing this via a standard FlexForm field).
The alternative, as Oleg hints to, would be to create sections with objects inside and define one non-IRRE field with a file reference and X number of additional fields. I don't recommend this solution as file relations from FlexForms are notoriously error prone when combined with section objects (due to the problem determining a true ID for the origin side of the relation, which then becomes too broadly associated with the entire FlexForm field instead of the individual section objects).
Even so: you already have the fields you need as actual TCA fields on sys_file
(on earlier versions of TYPO3 this requires EXT:filemetadata
to be installed). I strongly suggest you use those fields and if you need additional ones, extend the TCA of the sys_file_reference
table to include whichever fields you like.
Upvotes: 2