[TYPO3-timtab] fix for nex/prev link

Lina Wolf liste at linawolf.de
Mon Jul 12 21:00:10 CEST 2010


Since tt_news version 3.0 prev and next links are included into tt_news. 
Therefore it is not nessesary anymore to produce them in timtab.

Just replace the markers with ###PREV_LINK### and ###NEXT_LINK###

"Raffael WäŠlterlin" <rw at cabag.ch> schrieb im Newsbeitrag 
news:mailman.1.1237383259.10002.typo3-project-timtab at lists.netfielders.de...
> Hi
>
> If you don't set the pid_list in typoscript the prev and next link do not 
> work. I'v got a patch for this (in tx_timtab_fe):
>
>
> /**
> * gets previous post if available
> *
> * @return array
> */
> function getPrevPost() {
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
> 'uid, title, datetime',
> 'tt_news',
> 'pid IN ('.$this->pObj->pid_list.') AND datetime < 
> '.$this->conf['data']['datetime'].$this->cObj->enableFields('tt_news'),
> '',
> 'datetime DESC'
> );
>
> return $res[0];
> }
>
> /**
> * gets previous post if available
> *
> * @return array
> */
> function getNextPost() {
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
> 'uid, title, datetime',
> 'tt_news',
> 'pid IN ('.$this->pObj->pid_list.') AND datetime > 
> '.$this->conf['data']['datetime'].$this->cObj->enableFields('tt_news'),
> '',
> 'datetime ASC'
> );
>
> return $res[0];
> }
>
> I take the pid_list from the pObj/tt_news attribut pid_list which combines 
> TypoScript and the selection in the content element.
>
> Is the project continued? Does somebody maintain it?
>
> Best regards
> Raffi 




More information about the TYPO3-project-timtab mailing list