[TYPO3-ttnews] Extending News with itemMarkerArrayFunc

Burkhardt Wenzel burkhardt.wenzel at xmental.de
Wed Jul 5 17:54:51 CEST 2006


hi there,

i desperately seek for help:

i try to extend tt_news 2.4 with an own extension
made with the kickstarter. this works and tt_news
is extended with a custom rte-field in the backend.

now i want to render the new field in the frontend.
therefore i used the userfunction "itemMarkerArrayFunc"

the marker is not recognized and of course no content
is displayed.

so: ho can i get access to my custom marker and how to render
the content of my custom field?

my setup:

#general
################################################################
new field in table tt_news: tx_xmnews_special
field name in extension: special
template-marker: ###NEWS_SPECIAL

#ts in root template
################################################################
# include php script for extended news
includeLibs.displayExtendedNews =EXT:xm_news/res/itemMarkerArrayFunc.php
# call user function
plugin.tt_news.itemMarkerArrayFunc = user_displayExtendedNews


#itemMarkerArrayFunc.php
################################################################
<?php
function user_displayExtendedNews($markerArray, $conf){
	$row = $conf['parentObj']->local_cObj->data; // get the data array of 
the current news record
		if ($row['tx_xmnews_special']) {
			$markerArray['###NEWS_SPECIAL###'] .= 
$conf['parentObj']->local_cObj->tx_xmnews_special($conf['parentObj']->conf[' 
tx_xmnews_special.']) ;

		} else { // No content in  field special
	    	$markerArray['###NEWS_SPECIAL###']='Test ';
	}
	return $markerArray;
}

?>

is this the rightz way to render the content of the custom field?

thanks for a hint!



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