[TYPO3-ttnews] Exclude Single from Lastes/List??

Stefan Kreisberg stefanNOSPAM at linkfactory.dk
Tue Jun 27 22:36:17 CEST 2006


Thomas Ziirsen wrote:

> Hello there,
> 
> I have a page with a single view and a latest view with the remaning
> news. My problem is that when i select one of the remaning news to
> display it in the single view its stille displayed in the remaning news
> column. Is there anyone that has made something simalar?
> 
> Request for excludeSingleFromList function :P
> 
> Cheers
> -Thomas


Untested, but I'll try to answer with a selectConf hook, something like:

class tx_news_selectConf {
        function processSelectConfHook($newsObj, $selectConf) {         
                $arr=t3lib_div::_GP('tx_ttnews');
                if(intval($arr['tt_news'])) {
                        $newsObj->selectConf['where'] .= ' AND tt_news.uid !=
'.intval(t3lib_div::_GP('tt_news'));
                }               
        }
}

BUBOC! (Beware untested block of code ...!)

-Stefan ;-)



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