0
votes

I'm trying to output data from a TypoScript array inside my Fluid template. This is what I have added this to my template's setup:

images {
  10 = url/to/image/1.jpg
  20 = url/to/image/2.jpg
  30 = url/to/image/3.jpg
}

This is what my template looks like:

<f:for each="{images}" as="image">
    <img src="{image} />
</f:for>

However, no data is being displayed. I even copied the example given in this question, but still it isn't working. What am I doing wrong? My Typo3 version is 6.1

2
What is the context? Are you inside your own extension with this template? - Daniel
Please add some more context info: Is the template rendered using a FLUIDTEMPLATE content object or is it rendered by an extension controller? Where exactly did you put the TypoScript for the images? Is it in the variables section of a FLUIDTEMPLATE object? - Jost

2 Answers

0
votes

Best would be to output the settings with the Debug-ViewHelper, so you can check if {images} is in fact an array.

0
votes

Your code contains a syntax error (missing closing quote in image property):

<f:for each="{images}" as="image">
    <img src="{image}" />
</f:for>