[TYPO3-english] using a hook for tt_news only in ONE contentelement

Ralf-René Schröder ralf.rene at online.de
Sun Sep 26 00:02:10 CEST 2010


hello list...
How is it possible using a hook for tt_news (see at the bottom) in only one contentelement?
On my site i want to filter a newslist only to show the own posts of the logged in user.
Works OK, but, and i understand why, it filters ALL elements of tt_news on the whole site
i need it only for one CE on one page (on the page there also where normal latest outputs of tt_news 
witch must be untouched)

what you think is the best way to solve the problem ?

____________________________________________________________________

class tx_myextension_hook extends tslib_pibase {
  function processSelectConfHook(&$pObj,$conf) {
  $this->cObj = t3lib_div::makeInstance('tslib_cObj'); // local cObj.
  $this->pObj = &$pObj;
  $this->realConf = $pObj;

  $id = $GLOBALS['TSFE']->fe_user->user['uid'];
  $conf['where'].= ' AND tx_ifttnewsdb1_feuser = $id ';
  return $conf;
  }  	
}

-- 
Ralf-René Schröder
http://if-20.com  ... YAML templates for TYPO3
______________________________________________


More information about the TYPO3-english mailing list