[TYPO3-english] Built in TCA image field - how to render?

Gregor Hermens gregor at a-mazing.de
Thu Apr 13 19:09:32 CEST 2017


Hi Glenn,

Glenn S wrote:

> I'm trying to add a content element to TYPO3 which will display 1 image,
> full width with a caption overlaid over it.
> 
> I added a TCA type called captionedImage which includes the 'image' field
> (see https://pastebin.com/KynjyjQY), and this appears to more or less
> work, although I don't know where the image field comes from.
> 
> Having done this, I can add my content type in the backend, and see that
> it includes a place to reference or upload files .
> 
> My question is: how do I then use this in my templates (current attempt:
> https://pastebin.com/shzCjX7z).
> 
> If I write {data.image} it renders the number of images I added.
> 
> If I use the f:for viewhelper with data.image it doesn't appear to have
> any iterations in it.
> 
> So, how do I iterate over this object? And, once I have done, where do I
> go to look up what fields are available?

take a look at

https://docs.typo3.org/typo3cms/TyposcriptReference/8-
dev/ContentObjects/Fluidtemplate/#dataprocessing

hth
Gregor
-- 
http://www.a-mazing.de/   |   Certified TYPO3 Integrator



More information about the TYPO3-english mailing list