[TYPO3-templavoila] DS-TypoScript in own Plugin using TV-API
Niels Fröhling
niels.froehling at adsignum.com
Fri Nov 7 14:37:02 CET 2008
Michael Feinbier wrote:
> Hi everybody,
>
> I need another clue on how to do the following:
> In an own Plugin I want to display own records mapped with an existing
> TemplateObject.
> According to the mininews example this looks like this:
>
> --- start ---
> $this->templateObject =
> t3lib_div::makeInstance('tx_templavoila_htmlmarkup');
> $this->templateArray = $this->templateObject->getTemplateArrayForTO(9);
>
> $records = $this->getRecordData();
> foreach ($records as $record) {
> $content .= $this->templateObject->mergeDataArrayToTemplateArray(
> $this->templateArray,
> array(
> 'field_head1' => $record['topline'],
> 'field_head2' => $record['title'],
> 'field_abstract' => $record['abstract'],
> 'link_more' => '#',
> 'field_image' => 'large_image_364_273.jpg',
> 'linkbox' => ''
> )
> );
> }--- end ---
>
> This works fine so far, but the field_image 'large_image_364_273.jpg' is
> simple outputted - but in my DS I defined for field_image the following:
>
> --- start ---
> <TypoScript><![CDATA[
> 10 = IMAGE
> 10.file.import = fileadmin/uploads/tx_templavoila/
> 10.file.import.current = 1
> 10.file.import.listNum = 0
> 10.imageLinkWrap = 1
> 10.imageLinkWrap {
> enable = 1
> enable.if.isTrue.field = link_more
> typolink.parameter.field = link_more
> }
> 10.wrap = <span class="teaser_img">|<span class="img_space"> </span></span>
> ]]>
> </TypoScript>
> --- end ---
> Now of course I want that this is processed with these Information not
> just simply echoed the value.
>
> How can that be done?
>
You realize that the HTML-Markup class for obvious reasons does not
know what Typoscript is, right? :)
Better try to create a constructed "row" and call renderElement(),
instead of re-creating the pi1 functionality.
> Thanks for any advice
>
> Greets,
> Michael
Ciao
Niels
More information about the TYPO3-project-templavoila
mailing list