[TYPO3-english] GIFBUILDER : change rotation of alternating images from tt_content

Mark Kuiphuis spam at markyourweb.com
Thu Sep 15 07:23:12 CEST 2011


Hi all,

I have successfully been able to manipulate images uploaded via the "Images Only" 
content element with GIFBUILDER. However, what I would like to see is that every odd 
image in the content element is rotated 357 degrees and every even image is rotated 3 
degrees.

I have the following Typoscript, but can't seem to figure out how to check which 
image in the list is currently being manipulated. (pretty much default from an 
example I found on the internet)

tt_content.image.20.1.file >
tt_content.image.20.1.file = GIFBUILDER
tt_content.image.20.1.file {
   XY = [10.w]+20,[10.h]+20
   backColor = #ffffff
   10 = IMAGE
   10 {
     file.import.current = 1
     file.width = 160
     file.height = 111
     offset = 10,10
   }

   40 = BOX
   40.dimensions = 5,5,[10.w]+5,[10.h]+5
   40.color = {$lib.shadowIntensity}
   45 = EFFECT
   45.value = blur=99 |
   50 = BOX
   50.dimensions = 0,0,[10.w]+10,[10.h]+10
   50.color = #ffffff

   60 < .10
   60.offset = 5,5
   70 = EFFECT
   70.value = rotate = 357
}

This works so far, but I would like to see something like:

if ($imageNumber%2 == 1) rotate 357;
if ($imageNumber%2 == 1) rotate 3;
(but then in Typoscript :D)

I've already been looking into listNum, register: IMAGE_NUM_CURRENT, 
register:IMAGE_NUM but I can't find a solution :S

Any help is much appreciated.

Regards,

Mark Kuiphuis


More information about the TYPO3-english mailing list