[TYPO3-ttnews] Calling tt_news from another extension

Michael Miousse michael.miousse at infoglobe.ca
Fri Oct 3 22:47:42 CEST 2008


Remi Touja wrote:

> 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
With insertRecord element?
-- 
Michael Miousse
Infoglobe
michael.miousse at infoglobe.ca


More information about the TYPO3-project-tt-news mailing list