[TYPO3-english] Problem with generating template
Dawid Pacholczyk
dpacholczyk at gmail.com
Thu Jun 3 11:36:08 CEST 2010
Hi List,
I have small problem in my ext.
At the moment I have template like this
<!-- ###SUBPART1### -->
<div>
<h1>Title</h1>
<!-- ###SUBPART2### -->
###CONTENT###
<!-- ###SUBPART2### -->
</div>
<!-- ###SUBPART1### -->
The php code to generate this template:
$templateCode = $this->cObj->fileResource($this->templateFile);
$template = $this->cObj->getSubpart($templateCode, '###'.$templateName.'###');
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$markerArray['###CONTENT###'] = $row['content'];
$content .= $this->cObj->substituteMarkerArray($template, $markerArray);
}
The problem is ofc that the Title is generating every time in loop (to
get more info I`ll say that this ext should provide list of records
(###CONTENT###) with one title)
And now. I`m guesing that I miss 1 more subpart in my template to
display Title just one time and the records in loop. But I don` know
how to write the code for it. Can you give me some info how to do it ?
Best regards,
Dawid Pacholczyk
--
Dawid Pacholczyk
tel: 502-054-334
gg: 5564051
skype: dpacholczyk
http://typo3blog.pl (only polish version at the moment)
More information about the TYPO3-english
mailing list