TYPO3 graphic title text

From snippet wiki
Jump to navigation Jump to search

In the template constants define these values:

 headtxtfont = fileadmin/font/schrift.ttf
 headtxtsize = 32
 headtxtlspc = 6
 headtxtwidth = 500
 headtxtcolor = #014495
 headtxtbgcol = #e7e7e7

And in the setup part you need this:

 1 temp.headtxt = IMAGE
 2 temp.headtxt {
 3   if.isTrue.field = subtitle
 4 
 5      params =
 6      altText = Grafiktitel
 7      titleText.field = title
 8      
 9      file = GIFBUILDER
10      file {
11        format = png
12        quality = 100
13        backColor = {$headtxtbgcol}
14        transparentBackground = 1
15        transparentColor = {$headtxtbgcol}
16        #transparentColor.closest = 1
17 
18        XY = {$headtxtwidth},[10.h]+[20.h]+[30.h]+{$headtxtlspc}+{$headtxtlspc}+4
19        maxWidth = {$headtxtwidth}
20        10 = TEXT
21        #10.text.field = subtitle//title
22        10.text.field = subtitle
23        10.text.listNum.splitChar=|
24        10.text.listNum=0
25 
26        10.align = right
27 
28        10.niceText = 0
29        10.nicetext.sharpen = 0
30        10.niceText.scaleFactor = 0
31        10.iterations = 0
32        10.antiAlias = 1
33 
34        10.fontFile = {$headtxtfont}
35        10.fontSize = {$headtxtsize}
36        10.fontColor = {$headtxtcolor}
37        10.offset = 0,{$headtxtsize}
38 
39        20 < .10
40        20.text.listNum = 1
41        20.offset = 0,{$headtxtsize}+[10.h]+{$headtxtlspc}
42 
43        30 < .10
44        30.text.listNum = 2
45        30.offset = 0,{$headtxtsize}+[10.h]+[20.h]+{$headtxtlspc}+{$headtxtlspc}
46      }
47 }