[TYPO3-ttnews] Calling tt_news from another extension

Dmitry Dulepov dmitry at typo3.org
Sun Oct 5 21:32:00 CEST 2008


Hi!

Rens Admiraal wrote:
> 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?

$cObj = t3lib_div::makeInstance('tslib_cObj');
$content = $cObj->cObjGetSingle('USER', $GLOBALS['TSFE']->tmpl->setup['plugin.']['tt_news.']);

This is how it would be normally called.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/duplicate_content_with_realurl/


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