[TYPO3-english] [tt_news] Extend tt_news with a new Plugin and addAdditionalMarkers

Marc Ernst marc at skyit-webdesign.com
Thu Mar 12 13:42:27 CET 2015

 0 down vote favorite

Hello fellow programmers,

I am stuck trying to programm an extension to the tt_news.
Here is what I wanna do: I have the tt_news extension and added a column named 'tx_y7fahrzeugdatenbank_participate' to the 'tt_news' SQL Table, which should contain UIDs from my table 'tx_y7fahrzeugdatenbank_domain_model_fahrzeug'.
Whenever an UID is found in the tt_news-Items Column, there should be added Code to the News Item, like a table, containing all items (maybe with pictures later).
(In the end, the user should be able to chose in the Backend, which entries to add in 'tx_y7fahrzeugdatenbank_participate' while he is writing the news. But thats a whole other story , yet.)
It would be very nice to get some directions from here, where should I invest my next research (API / tt_news / other Documentation), or even better some code snippets I could investigate for my own use. 

I have an urgent need of a soluation, so thank you alot in advance for any help you could provide.

Here my Function in my "Fahrzeuge.php"

function extraItemMarkerProcessor(array $parentMarkerArray, array $row, array $lConf, tx_ttnews $tt_news) {

$this->cObj = $tt_news->local_cObj;     

    // $query = 'SELECT pid FROM tx_y7fahrzeugdatenbank_domain_model_fahrzeug WHERE name="' . $this->getName() . '"';
    $res1 = \TYPO3\CMS\Core\Database::exec_SELECTgetRows('pid','tx_y7fahrzeugdatenbank_domain_model_fahrzeug', 'WHERE name="' . $this->getName() . '"','','','','');

    // $query2 = 'SELECT tx_y7fahrzeugdatenbank_participate FROM tt_news';          
    $res2 = \TYPO3\CMS\Core\Database::exec_SELECTgetRows('tx_y7fahrzeugdatenbank_participate','tt_news','','','','');

    echo '<p class="y7debuginfo">Q1: ' . $res1 . ' // Q2: ' . $res2 . '</p>'; 

    if(\TYPO3\CMS\Core\Utility\GeneralUtility::inList($res1[uid], $res2)) {
        // some output
        echo '<div class="tx_y7fahrzeugdatenbank">Found Entry: ' . $this->getName() . '</div>'; 


Here the Additions I made to my plugins ext_localconf.php

if (TYPO3_MODE!='BE')   {

require_once(t3lib_extMgm::extPath('y7_fahrzeugdatenbank'). 'y7_fahrzeugdatenbank/Classes/Domain/Model/Fahrzeug.php');

$TYPO3_CONF_VARS['EXTCONF']['tt_news']['extraItemMarkerHook'][] = 'tx_y7fahrzeugdatenbank'; 
$TYPO3_CONF_VARS['EXTCONF']['tt_news']['extraCodesHook'][] = 'tx_y7fahrzeugdatenbank'; 
$TYPO3_CONF_VARS['EXTCONF']['tt_news']['selectConfHook'][] = 'tx_y7fahrzeugdatenbank';
$TYPO3_CONF_VARS['EXTCONF']['tt_news']['extraGlobalMarkerHook'][] = 'tx_y7fahrzeugdatenbank';

More information about the TYPO3-english mailing list