[TYPO3-dev] cObjGet
Christian Welzel
gawain at camlann.de
Mon Mar 27 16:24:00 CEST 2006
Hi there !
Currently i'm trying to develope a little extension and wanted to
use TS for rendering. But somehow it does not work. So perhaps i
misunderstood some parts...
i created a new local cObj with
$this->lcObj = t3lib_div::makeInstance('tslib_cObj');
then i fetch some data from my table into $row
$row = $this->pi_getRecord('tx_sngallery_gallery',$this->piVars['showUid']);
a print_r() shows that the record is there and $row is filled.
there after i start the local cobj and call cObjGet to do the rendering:
$this->lcObj->start($row, 'tx_sngallery_gallery');
$markerArray['###IMAGE###'] = $this->lcObj->cObjGet($this->conf['image.']);
$markerArray['###TITLE###'] = $this->lcObj->cObjGet($this->conf['image_title.']);
But nothing is returned :(
My $row looks like that:
Array
(
[uid] => 1
[pid] => 193
[tstamp] => 1143466008
[crdate] => 1143454830
[cruser_id] => 1
[sorting] => 256
[deleted] => 0
[hidden] => 0
[fe_group] => 0
[title] => TEst bild
[type] => 0
[description] =>
[thumbnail] =>
[cat] => 1
[media] => schech_logo.gif
)
the TS code is that:
plugin.tx_sngallery_pi1 {
image = COA
image {
10 = IMAGE
10.file {
import = uploads/tx_sngallery
import.field = media
import.listNum = 0
}
}
image_title = COA
image_title {
10 = TEXT
10.value.field = title
}
}
The markers are replaced with empty strings... but if i change the image_title
to
image_title = COA
image_title {
10 = TEXT
10.value = This is a Test
}
"This is a Test" shows up in the output. So i think i'm not totally wrong.
Can someone give me a hint, how to do the work in the correct way ?
--
Viele Grüße, Christian Welzel
schech.net | Visuelle Kommunikation
Schillerstraße 2-B · 01326 Dresden
Fon +49-351-8361445
Fax +49-351-8361446
http://www.schech.net
More information about the TYPO3-dev
mailing list