[Typo3] dynamic $this->internal["maxPages"] (browse box)
Chi Hoang
chibo at gmx.de
Sat Sep 17 11:15:30 CEST 2005
Hi Christian,
christian oettinger schrieb:
> But this will show me the first four links all the time, no matter on
> which page I am. So say I have 7 result pages and I am already on page
> four: I see "Page1 Page2 Page3 Page4". Is there a possibilty to change
> this dynamically.
> So on Page 4 I see " Page2 Page3 Page4 Page5"
> On Page 5 I see " Page3 Page4 Page5 Page6"
> and so on?
yes, there must be a bug in the function pi_list_browseresults. the
indexed search has the same bug. when its come to the enumeration of the
pages the function forgets to add the current pointer to the
enumeration. just add the var $pointer to the var $a like below:
From (originally from indexed search):
for($a=0;$a<$max;$a++) {
$links[]='<td'.($pointer==$a?$this->pi_classParam('browsebox-SCell'):'').'><p>'.$this->makePointerSelector_link(trim($this->pi_getLL('pi_list_browseresults_page','Page',1).'
'.($a+1)),$a).'</p></td>';
}
to
for($a=0;$a<$max;$a++) {
$links[]='<td'.($pointer==$a?$this->pi_classParam('browsebox-SCell'):'').'><p>'.$this->makePointerSelector_link(trim($this->pi_getLL('pi_list_browseresults_page','Page',1).'
'.($pointer+$a+1)),$pointer+$a).'</p></td>';
}
that should solve your problem. i will do a bugreport on indexed search
as well.
greets,
chi
More information about the TYPO3-english
mailing list