[TYPO3-ttnews] Add a link to a tt_news in my extension

Gregory Loichot gloichot at cross-systems.ch
Fri Feb 13 16:17:32 CET 2009


Hi,

Thank for your answer !
I found an interesting piece of code on the web :

$veryLocal_cObj = t3lib_div::makeInstance('tslib_cObj');
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tt_news.']['code'] = 'LIST';
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tt_news.']['templateFile'] = 
$this->conf['newsTemplate'];
$content = $veryLocal_cObj->cObjGetSingle('USER', 
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tt_news.']);

$veryLocal_cObj2 = t3lib_div::makeInstance('tx_ttnews');
// ??? What to do next ?

The main goal is to try using getRelated($uid) from tt_news plugin, but 
I don't know how to continue the code...

Any idea ?

Steffen Gebert a écrit :
> Gregory Loichot wrote:
>> How can I generate "linkToAtt_news1" and "linkToAtt_news2" ?
> 
> Use typolink function and give SINGLE page id and parameter "tt_news" with value of the news id. May be just disable (realurl if enabled) and have a look how your links from LIST view look like.
> 
> If you have realurl and tt_news' human readable dates enabled you also have to generate those additional parameters (month, year, etc).
> 
> Steffen


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