[TYPO3] Replacing titles in the content part by an image with GIFBUILDER

Bas Heutink webdesign at inbalanshasselt.nl
Mon Jan 21 15:54:41 CET 2008


Hi,

With Typoscript/gifbuilder I replace header text with an image. The 
point is that TS replaces all titles, while I only want <h1 
class="csc-firstHeader"> to be replaced by this image, the following H1 
tags should be replaced with a smaller font.

This is the TS code:
## Graphical text invoegen
cHeader = IMAGE
cHeader {
     alttext.cObject = TEXT
     alttext.cObject.field = header
     wrap = <h1> | </h1>
     file = GIFBUILDER
     file {
         format = gif
         reduceColors = 8
         transparentColor = #f6f2ea
         XY = [10.w]+14,[10.h]+2
         backColor = #f6f2ea
         10 = TEXT
         10 {
             text.field = header
             fontSize = 16
             fontColor = #668712
             offset = 0,16
             fontFile = fileadmin/templates/fonts/TREN1.TTF
         }
     }
}
lib.stdheader.10.1 < cHeader

With this code TS decides that only H1 tags should be replaced:
lib.stdheader.10.1 < cHeader

Another solution could be that only <h1 class="csc-firstHeader"> would 
get the H1 tag the following titles should then get the H2 tag, how this 
could be done, I don't know.

Who knows what to do?


More information about the TYPO3-english mailing list