[TYPO3-english] Produce an IMAGE from a string by stdWrap
Sebastian Gebhard
s.gebhard at markenmotiv.de
Mon Mar 16 14:27:32 CET 2009
Sebastian Gebhard schrieb:
> Hi list,
>
> in my Extension i have the following Code:
>
> $headline = $this->cObj->stdWrap($headline,
> $this->conf['menuheader_stdWrap.']);
>
> $headline initially is just a plain string and via TS the admin can wrap
> it with <h2>|</h2> for example.
>
> How is it possbile to make it a grapical headline using a special font
> only by using TS?
>
> I could use something like
>
> menuheader_stdWrap.cObject = IMAGE
> menuheader_stdWrap.cObject{
> file = GIFBUILDER
> file{
> # build up the image here
> }
> }
>
> But how would I include the original value of $headline?
I solved it but i tweaked up my PHP-Code:
$this->conf['menuheader_stdWrap.']['setCurrent'] = $headline;
$headline = $this->cObj->stdWrap($headline,
$this->conf['menuheader_stdWrap.']);
Now in any TS setup the value can be accessed via current.
E.g:
menuheader_stdWrap.cObject = IMAGE
menuheader_stdWrap.cObject{
file = GIFBUILDER
file{
10 = TEXT
10{
text.current = 1
color = #000
offset = 0,20
fontSize = 20
}
xy = [10.w],[10.h]
}
}
More information about the TYPO3-english
mailing list