[TYPO3-timtab] fix for nex/prev link
Raffael Wälterlin
rw at cabag.ch
Wed Mar 18 14:34:19 CET 2009
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