[TYPO3-mvc] Is it possible to 'hook' a extbase EXT into tt_news?
Johannes C. Schulz - EnzephaloN IT-Solutions
info at enzephalon.de
Fri Jan 28 19:43:01 CET 2011
Hi at all!
If I like to insert data from my extbase extension into tt_news, how should
I do that? I tried to write an extension which extends tt_news. Now I can
choose the data from my extbase extension, but I don't know how to assign
this to the marker.
It's really the "old way" ;-)
<?
class tt_news_psoabilling{
function extraItemMarkerProcessor($markerArray,$row,$lConf,$obj){
$thisbands=$row['tx_ttnewspsoabilling_psoabilling_band'];
t3lib_div::print_array($thisbands);
$content="";
$selectConf = array();
$selectConf['selectFields'] = '*';
$selectConf['fromTable'] = 'tx_psoabilling_domain_model_band';
$selectConf['where'] = 'tx_psoabilling_domain_model_band.deleted=0
AND tx_psoabilling_domain_model_band.t3ver_state<=0 AND
tx_psoabilling_domain_model_band.hidden=0';
$selectConf['where'] .= 'tx_psoabilling_domain_model_band.uid IN
$thisbands';
$res = $GLOBALS['TYPO3_DB']->
exec_SELECTquery($selectConf['selectFields'], $selectConf['fromTable'],
$selectConf['where']);
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
foreach($row as $band=>$value){
$content.=
HERE A SIMPLE TEMPLATE SHOULD BE BUILD
}
$markerArray['###BANDS###'] = $this->$obj->stdWrap($content);
return $markerArray;
}
}
?>
1.) I insert this by:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerProcessor'
][] = 'EXT:tt_news_psoabilling/tt_news_psoabilling.php:tt_news_psoabilling';
But nothing happened!
2.) Maybe there is a way to do it the regular way in extbase???
If there is anybody who can help me I would be happy!
Best regards
Johannes
More information about the TYPO3-project-typo3v4mvc
mailing list