[TYPO3-mvc] How to get to cObj->IMAGE

Dawid Pacholczyk dpacholczyk at gmail.com
Tue Jan 11 00:02:43 CET 2011


On 10.01.2011 13:36, Xavier Perseguers wrote:
> Hi,
>
>> On 10.01.2011 08:46 Dawid Pacholczyk wrote:
>>> There are many thing from the cObj object that can be usefull. Is there
>>> any way to get to them directly ?
>>>
>>
>> A generic way to render cObjects is the cObject viewhelper:
>>
>> <f:cObject typoscriptObjectPath="lib.myImage" />
>>
>> lib.myImage = IMAGE
>> lib.myImage.file = fileadmin/user_upload/images/example.jpg
>> lib.myImage.altText = Example image
>
> And, good to know, you may pass an object to optional attribute data and
> then use it from TS as usual:
>
> <f:cObject typoscriptObjectPath="lib.myImage" data="{yourObject}" />
>
> lib.myImage = IMAGE
> lib.myImage.file.import = fileadmin/user_upload/images/
> lib.myImage.file.import.field = image
> lib.myImage.file.import.listNum = 0
> lib.myImage.altText.field = title
>
> which would get attributes "image" and "title" from your object.
>
> Xavier

Thanks guys. Thats great things you posted here.

Thats is in 100% what I needed.

Best regards,
Dawid "Fixus" Pacholczyk


More information about the TYPO3-project-typo3v4mvc mailing list