[TYPO3-english] Gifbuilder, render only if text is given

Aneta Jaroslava aneta2000 at hotmail.com
Sat Jan 30 11:19:11 CET 2010


Hi all,

I have the following gifbuilder TS.
The mainheadline image is renderes as img and wrapped in h1.
But when the mainheadline is empty, i do not want to render the  
mainheadline image at all.
I also want to remove the h1 if the image is not rendered, when no  
headline is given.

How can I do that?
any ideas and suggestions?

I tried ifEmpty[1], but it does not work, see below.

lib.gfxHeadline  = IMAGE
lib.gfxHeadline {

   wrap = <h1>|</h1>

   altText.field   = mainheadline
   titleText.field = mainheadline

   file = GIFBUILDER
   file {

     XY = [10.w]+10, [10.h]+20
     backColor        = #ffffff
     transparentColor = #ffffff

     10 = TEXT
     10 {
       niceText     = 1
       offset       = 0, [10.h]+14
       fontSize     = 25
       fontFile     = fileadmin/templates/fonts/arial.ttf
       fontColor    = #008000
       text.current = 1
     }
   }
}

lib.stdheader.10.1 >
lib.stdheader.10.1 < lib.gfxHeadline


[1]

lib.gfxHeadline  = IMAGE
lib.gfxHeadline {

   wrap = <h1>|</h1>

   altText.field   = mainheadline
   titleText.field = mainheadline

   file = GIFBUILDER
   file {

     XY = [10.w]+10, [10.h]+20
     backColor        = #ffffff
     transparentColor = #ffffff

     10 = TEXT
     10 {
       niceText     = 1
       offset       = 0, [10.h]+14
       fontSize     = 25
       fontFile     = fileadmin/templates/fonts/arial.ttf
       fontColor    = #008000
       text.current = 1
       text.ifEmpty = TEXT
       text.ifEmpty.data = mainheadline
       text.required = 1
       text.ifEmpty.wrap = |
     }
   }
}

lib.stdheader.10.1 >
lib.stdheader.10.1 < lib.gfxHeadline


Thanks and regards



More information about the TYPO3-english mailing list