[TYPO3] Assign image in FCE dynamically

Michael Niemann xml.transformator at yahoo.com
Wed May 28 11:18:14 CEST 2008


Hello,

I have the following problem to solve. The user can add two images to my FCE. Only one image is displayed. Image 1 is mandatory but image 2 is precedented.
So if two images are included image 2 is shown otherwirse image 1.

I inserted two fields (image1 and imge2) of the type image which are not mapped.

I also included an image tag in the html template. Another field called 'disp_image' is an attribute mapped to the src attribute in the html but has no input type.

My idea was assigning the values of image1 and image2 to disp_image through typoscript:

<field_disp_image type="array">
                <type>attr</type>
                <tx_templavoila type="array">
                    <title>image</title>
                    <sample_data type="array">
                        <numIndex index="0"></numIndex>
                    </sample_data>
                    <eType>none</eType>
                    <TypoScript>
                        10 = TEXT
                        10.value = {field:field_image1//field:field_image2}
                    </TypoScript>
                </tx_templavoila>
</field_disp_image3>

I've tried several syntax combinations for assigning the fields but they are never evaluated.

Thanks for any hints.

Regards
Michael

       


More information about the TYPO3-english mailing list