[TYPO3-english] Special requitements for graphical headline

Sebastian Gebhard s.gebhard at markenmotiv.de
Tue Feb 3 10:35:12 CET 2009


Hi Tomas,

thank you for your answer. I tried you Code and it works well, if 
there's only one word in the title. But if there are more words only the 
  first Word is rendered correctly (that means the first char is 
fscript.ttf)

Now i tried to use split to get each word but i'm struggling to combine 
your code with mine.

For testing i tried this. I thought it would render the first word in 
fscript and the second in georgia. But the fontxxx properties do not 
work in this context.

lib.headline = COA
lib.headline{
   10 = TEXT
   10{
     data = page:title
     wrap = <h1>|</h1>
   }
   20 = IMAGE
   20{
     file = GIFBUILDER
     file{
       backColor = #FFFFFF
       XY = [10.w],60
       10 = TEXT
       10{
         offset = 0,30
         text.data = page:title
         text.split{
           token.char = 32
           1{
             current = 1
             fontSize = 30
             fontFile = fileadmin/fonts/fscript.ttf
             fontColor = #cccc33
           }
           2{
             current = 1
             fontSize = 18
             fontFile = fileadmin/fonts/georgia.ttf
             fontColor = #cccc33
           }
         }
       }
     }
   }
}

How can I use your code AND split the title by space characters?
Sebastian Gebhard

Tomas Mrozek schrieb:
> Try splitting the text this way:
> 
> lib.headline = COA
> lib.headline {
>   10 = TEXT
>   10{
>     data = page:title
>     wrap = <h1>|</h1>
>   }
>   20 = IMAGE
>   20{
>     file = GIFBUILDER
>     file{
>       backColor = #FFFFFF
>       XY = [10.w]+[20.w],60
> 
>       10 = TEXT
>       10 {
>         offset = 0,30
>         fontSize = 30
>         fontFile = fileadmin/fonts/fscript.ttf
>         fontColor = #cccc33
>         text.data = page:title
>         text.case = upper
>         text.substring = 0,1
>       }
> 
>       20 = TEXT
>       20 {
>         offset = [10.w],30
>         fontSize = 18
>         fontFile = fileadmin/fonts/georgia.ttf
>         fontColor = #cccc33
>         text.data = page:title
>         text.case = upper
>         text.substring = 1,
>       }
>     }
>   }
> }
> 
> Tomas Mrozek


More information about the TYPO3-english mailing list