[TYPO3-ttnews] Calling tt_news from another extension
Remi Touja
remi.touja at gmail.com
Fri Oct 3 16:30:20 CEST 2008
Rens Admiraal a écrit :
> Hi all,
>
> I've created an extension in which I want to add tt_news. As an example
> I've created a <div> element, in which I want a news list (or other
> plugin) to load, and show it's content.
>
> I thought I could do this with the following code:
>
>
> $tt_news = t3lib_div::makeInstance('tx_ttnews');
> $div .= $tt_news->main_news($content, $conf);
>
> But, this doesn't work.
>
> Does anybody know how I can do this?
>
>
> Greetz,
> Rens
It's an all subject without answer, so i answer.
You can use this php code to insert tt_news (or any extension) in an
other extension
$fieldConf = array(
'code.' => '',
'code' => 'LIST',
'pid_list' => 4,
'singlePid' => 19,
'templateFile' => 'fileadmin/templates/extensions/tt_news/default.html',
);
$div = $this->cObj->cObjGetSingle('< plugin.tt_news',$fieldConf);
I've a question too, how can i just show news by selecting uids ? Thanks
More information about the TYPO3-project-tt-news
mailing list