54 if(
$result->getResultPageNumber() > 1)
56 $this->ctrl->setParameter($this,
'page_number',
$result->getResultPageNumber() - 1);
57 $this->tpl->setCurrentBlock(
'prev');
58 $this->tpl->setVariable(
'PREV_LINK',$this->ctrl->getLinkTarget($this,
'performSearch'));
59 $this->tpl->setVariable(
'TXT_PREV',$this->lng->txt(
'search_page_prev'));
60 $this->tpl->parseCurrentBlock();
62 for($i = 0; $i < ceil(count(
$result->getResults()) /
$result->getMaxHits()); $i++)
64 if($i + 1 ==
$result->getResultPageNumber())
66 $this->tpl->setCurrentBlock(
'pages_link');
67 $this->tpl->setVariable(
'NUMBER', $i + 1);
68 $this->tpl->parseCurrentBlock();
72 $this->ctrl->setParameter($this,
'page_number', $i + 1);
73 $link =
'<a href="'.$this->ctrl->getLinkTarget($this,
'performSearch').
'">'.($i + 1).
'</a> ';
74 $this->tpl->setCurrentBlock(
'pages_link');
75 $this->tpl->setVariable(
'NUMBER',$link);
76 $this->tpl->parseCurrentBlock();
81 $this->tpl->setCurrentBlock(
'next');
82 $this->ctrl->setParameter($this,
'page_number',
$result->getResultPageNumber() + 1);
83 $this->tpl->setVariable(
'NEXT_LINK',$this->ctrl->getLinkTarget($this,
'performSearch'));
84 $this->tpl->setVariable(
'TXT_NEXT',$this->lng->txt(
'search_page_next'));
85 $this->tpl->parseCurrentBlock();
88 $this->tpl->setCurrentBlock(
'prev_next');
89 $this->tpl->setVariable(
'SEARCH_PAGE',$this->lng->txt(
'search_page'));
90 $this->tpl->parseCurrentBlock();
92 $this->ctrl->clearParameters($this);