1
votes

I am using flux and fluid content element for making content editable by user. i added field for image which allows multiple images to upload.

But now i am not able to show these images. my value of field image is like :

image => 'kip.jpg,772_Visteon_010.jpg'

normally if i have only one value then i can show it by <f:image> or <img src="{image}" /> Tag.

so, anybody have idea how can i display multiple images or files. Thanks in advance.

2

2 Answers

1
votes

you seem to use the old style of image inclusion: comma separated list of names with copies below uploads/. Then you need to split (https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Split/Index.html) the field and work the resulting array as before.

in the long time you should use FAL, so the handling is a little bit more complex

1
votes

You should use flux inline fal for multiple images in fluid content element, below is a syntax for inline fal,

<flux:field.inline.fal name="settings.image" label="Image" />

After that you can render it by following code,

<f:for each="{v:content.resources.fal(field: 'settings.image')}" as="image">
    <f:image treatIdAsReference="1" src="{image.id}" title="{image.title}" alt="{image.alternative}"/><br/>
</f:for>

you can find detail in below url, https://fluidtypo3.org/viewhelpers/flux/master/Field/Inline/FalViewHelper.html

hope this will help you.