[TYPO3-commerce] How-To: multiple images

Barbara Wijbenga bwijbenga at chello.nl
Mon Oct 29 16:34:47 CET 2007


Can anyone tell me which code I have to put where to make this work? I never 
know whether I have to put code in the TS template in Constants, Setup or in 
the TSconfig field of the rootpage...

Thanks,
Barbara



"Franz Koch" <typo.removeformessage at fx-graefix.de> schreef in bericht 
news:mailman.1.1188766331.2887.typo3-project-commerce at lists.netfielders.de...
> Hi guys,
>> Will be glad to hear your comments how to improve or/and simplify this TS 
>> or other ways to display several images per product.
>> In general if someone has other tips and tricks for commerce please share 
>> you knowledge with community. Please add "How-To:" pattern in front of 
>> such message.
>
> Thanks for this posting. Based on that I came to a much easier solution 
> based on only TS with much more flexibility I think, as you can use the 
> power of optionSplit as well as COA for every image:
>
> ---------
> lib.tx_commerce.products.fields {
>
>   images >
>   images = stdWrap
>   images {
> setContentToCurrent = 1
> split {
> token = ,
> # configuring optionSplit - the first record should
> # use rendering 1 which is a big image, every
> # other following record should use rendering 2
> cObjNum = 1||2
>
> # big image
> 1.10 = IMAGE
> 1.10 {
> file {
> import = uploads/tx_commerce/
> import.current = 1
> maxW = 250
> }
> imageLinkWrap < tt_content.image.20.1.imageLinkWrap
> imageLinkWrap.enable >
> imageLinkWrap.enable = 1
> wrap = |<br />
> }
>
> # small image
> 2 < .1
> 2.10.file {
> width = 60c
> height = 60c
> maxW = 60
> maxH = 60
> ext = jpg
> }
> 2.10.wrap >
> }
>   }
>   teaserimages >
>   teaserimages < .images
>   teaserimages {
> # only render 1 image, to limit the optionsplit to 1
> split.max = 1
> split.1.10 {
> # alter rendering for teaser image
> file {
> width = 140m
> height = 105m
> maxW = 140
> maxH = 105
> }
> wrap >
> # don't apply clickenlarge
> imageLinkWrap >
> }
>   }
> }
> --------
>
> In my case, I don't use the field for teaser images, so I do the following 
> to alter the rendering for listView:
>
> --------
> plugin.tx_commerce_pi1.listView {
> products.fields.images < .products.fields.teaserimages
> }
> --------
>
>
> Hope that helps someone.
>
> --
> Kind regards,
> Franz Koch
> 



More information about the TYPO3-project-commerce mailing list