« August 2011»
M T W T F S S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

[blog...]

10.08.2011
18:11

Mulitple Images in One TemplaVoilà FCE Field

Two Column FCE in the Frontend
Two Column FCE in the Backend
Multiple Images Configuration in Data Structure

From time to time I play around with TemplaVoilà - the TYPO3 extension for very flexible template organization.

Most sites with TYPO3 are happy with the 2/3 column page layout but sometimes it is useful to be more flexible. TemplaVoilà is very complex and I'm still not sure if I should love or hate it.

 

Currently I had the order create a multilanguage capable Flexible Content Element (FCE) with text and a list of multiple images.

 

The multilanguage FCE is done by editing the DS (Data Structure). First I hesitated to change this by hand because I still like to make the Update Mapping via the backend wizard. But this part of the XML structure won't be overwritten if you call the Update Mapping dialog later. So you change safely the first meta array into:

 

 

<meta type="array">
<langChildren type="integer">1</langChildren>
<langDisable type="integer">0</langDisable>
</meta>

 

The multiple image list can't be done with the default TypoScript settings suggested by TemplaVoilà. I found a snippet in the web which suggests to edit the DS and to add some TypoScript code. But in this case you really loose the ability to change the mapping with the Update Mapping wizard.

Luckily you don't have to edit the DS! Maybe it's the luck of TYPO3 4.5. In my case it works as follows:

  • create the FCE and add a mapping for a field called e.g. field_column_2 because I want the image list in the second column
  • choose "Image Field" from the "Element Present" dropdown menu
  • change the size and maxsize in the FORM-settings
  • replace the suggested TypoScript code by the following:
10 = COA
10 {   
10 = HTML   
10 {     
value.field = field_column_2   #name of the DS tv field       
value.split {           
token = ,           
cObjNum = 1           
1 {               
10 = IMAGE               
10 {                   
file {                       
import.current = 1                       
import = uploads/tx_templavoila/                       
format = jpg                        
width = 200c
height = 200c                   
}               
}           
}       
}   
}
}
  •  
  • 1 Comment(s)
  •  
letsjump
07.09.2011
23:23

Be careful, Comments are not admitted in the typoscript code field of your DS, so delete "#name of the DS tv field"!!!!
Thank you for your userful tip!

Your comment

Notify me when someone adds another comment to this post

back

[ 07.05.2012 ]