[TYPO3-ttnews] Add and substitute marker with typoscript

Martin Schmidt madmat22_de at freenet.de
Fri May 11 16:55:59 CEST 2007


Hmm...ok, thank you.
So I figure I start off best by examining i.e. "chcnewscon" to get an idea 
how this hook thing works.
Oh boy...all this just for adding one string to another.
Right now I have no clue how to start.

Have a nice weekend...
Martin

"Martin Ficzel" <martin.ficzel at gmx.de> schrieb im Newsbeitrag 
news:mailman.1.1178813757.24662.typo3-project-tt-news at lists.netfielders.de...
> Martin Schmidt schrieb:
>> Could this be used to achieve sth. like the output of the category title
>> before each related news title ?
>> Instead of :
>> Related News 1
>> Related News 2
>>
>> Like:
>> Category1: Related News 1
>> Category1: Related News 2
>>
>> I?m trying to to that by modifying the class.tx_ttnews.php, putting
>>
>> $relrow['title'] = $cUid['title'].":&nbsp;".$relrow['title'];
>>
>> into the "getRelated()" function.
>> Which works, but only in default language.
>> And I dont think its THE way to do it...
>>
>> Martin
>
> ofcourse you shoud do it that way! the hook code looks like this.
>
> // class.tx_ttnews.php
>
>> // Adds hook for processing of extra item markers
>> if 
>> (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerHook'])) 
>> {
>> foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerHook'] 
>> as $_classRef) {
>> $_procObj = & t3lib_div::getUserObj($_classRef);
>> $markerArray = $_procObj->extraItemMarkerProcessor($markerArray, $row, 
>> $lConf, $this);
>> }
>> }
>
> wich means that you can override the existing settings and that you have
> aceess to the tsconfig and the whole record row in your hook method
> that's more than enough. the advantage for you is that by providing a
> hook you are creating an update proof solution.
>
>
> regards Martin 




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