[TYPO3] passing Typoscript generated images to PHP for display in an html template ...
Jason Brock
jasonrbrock at gmail.com
Sun Jun 4 17:24:22 CEST 2006
Greetz,
I've created a small extension that stores a couple of values in the
content table.
Currently, I'm using an html template to display the content:
<tr>
<td>###CHANNELNAME###</td>
<td>###CHANNELTARGET###</td>
</tr>
... the following PHP is used to substitute the values:
$subpartArray["###CHANNELNAME###"] =
$this->cObj->data['tx_enginchannelheader_name'];
$subpartArray["###CHANNELTARGET###"] =
$this->cObj->getTypoLink($targetLabel, $targetURL);
$content = $this->cObj->substituteMarkerArrayCached($template,
$subpartArray, array(), array());
return $this->pi_wrapInBaseClass($content);
This works well. However, I'd like render the marker values as graphics.
What's the best way to do this?
I've tried creating an image using TS passing the result
channelNameImage < channelNameImage:
plugin.tx_enginchannelheader_pi1 {
channelNameImage = IMAGE
channelNameImage.file = GIFBUILDER
channelNameImage.file {
XY = [10.w]+20,12
backcolor = #01aade
transparentBackground = 1
10 = TEXT
10.fontColor = #000000
10.text.field = tx_enginchannelheader_name
10.antiAlias= 1
10.fontSize= 11
10.fontFile = fileadmin/templates/main/fonts/TGB_____.TTF
10.offset = 10,10
10.niceText = 0
}
channelNameImage < channelNameImage
templateFile = EXT:engin_channel_header/engin_channel_template.html
parser < tt_content.text.20.parseFunc
}
Then modifying my PHP to:
$subpartArray["###CHANNELNAME###"] =
$this->cObj->IMAGE($this->conf['channelNameImage']);
But I can't get the image to display.
Where am I going wrong?
Thx in advance,
Jason.
-~-
--
-~-
More information about the TYPO3-english
mailing list