[TYPO3-mvc] CObject-ViewHelper to output several images
Michael Bakonyi
kontakt at mb-neuemedien.de
Fri Jan 27 12:52:09 CET 2012
Hi everybody,
I'd like to use the CObject-ViewHelper to render images from a standard
backend-field with TCA-type of "group", where the image-filenames are
divided by colon as usual.
So I set up the ViewHelper by fetching my Object:
<f:cObject typoscriptObjectPath="lib.image" data="{project}" />
And in TS I try to access the mentioned field/property:
lib.image = TEXT
lib.image{
field = galleryImages
field.split{
token = ,
cObjNum = 1
1{
10 = IMAGE
10{
file{
import = uploads/pics/
import.current = 1
maxW = 272
}
}
}
}
}
Nothing special here, but the ViewHelper neither outputs anything nor
does it report any error-message, whereas this is working:
lib.image = TEXT
lib.image{
field = galleryImages
field.split{
token = ,
cObjNum = 1
1{
10 = TEXT
10{
current = 1
}
}
}
}
I don't want to build my own ViewHelper here as I would then have to
care about scaling and so on which I think is already there via TS and
just has to be used.
(I also wanted to use the stated attribute "current" for the ViewHelper
but strangely then the error-message appears that it was not registered
(using Extbase/Fluid 1.3.0). I couldn't find a bug-report about this
issue – anybody else having problems with this in 4.5.10?)
Would be great if someone would have a hint for me so that I can move on
in the right direction.
Cheers,
Michael
More information about the TYPO3-project-typo3v4mvc
mailing list