/ Published in: TYPO3
The snippet is splitted in two parts. One in the main template and one in the Templavoila DataStructure XML field. In the TypoScript part the value of the TV field is splitted by "," and the cObj 1 is adapted to the current value. you could also use split options like 1 |*| 2 |*| 3. In this case the first image will be processed in cObj 1 the last in cObj 3 and all images between in cObj 2.
The only limit how much images you can use is the limit in the TV DS, in this expamle is set the to 5 and to 15.
The only limit how much images you can use is the limit in the TV DS, in this expamle is set the to 5 and to 15.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
##################################################### ## Typoscript in the main template ##################################################### temp.content_Img { 10 { value.field = field_img #name des feldes im tv xml token = , cObjNum = 1 1 { 10 { file { import.current = 1 import = uploads/tx_templavoila/ format = jpg width = 245c height = 155c } } } } } } lib.contentImgNorm { 10 < temp.content_Img } ##################################################### ## adjustments in the TemplaVoil� DataStructure XML ##################################################### <T3DataStructure> <meta type="array"> <langDisable>1</langDisable> </meta> <ROOT type="array"> <tx_templavoila type="array"> <title>ROOT</title> <description>Multiple Images</description> </tx_templavoila> <type>array</type> <el type="array"> <field_img type="array"> <tx_templavoila type="array"> <title>Bilder</title> <sample_data type="array"> <numIndex index="0"></numIndex> </sample_data> <eType>imagefixed</eType> <tags>*:inner</tags> <TypoScriptObjPath>lib.contentImgNorm</TypoScriptObjPath> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>group</type> <internal_type>file</internal_type> <allowed>gif,png,jpg,jpeg</allowed> <max_size>1000</max_size> <uploadfolder>uploads/tx_templavoila</uploadfolder> <show_thumbs>1</show_thumbs> <size>5</size> <maxitems>15</maxitems> <minitems>0</minitems> </config> <label>Bilder</label> </TCEforms> </field_img> </el> </ROOT> </T3DataStructure>