joomla smart search显示所有结果

时间:2014-06-09 10:37:02

标签: php search joomla

是否可以在一个页面中显示所有结果,Joomla的组件"智能搜索"?

我使用的是Joomla 3.x,但在结果页面的底部有一个标准的分页显示"上一页1 2 3 4下一页"。我想在第一页上显示所有结果,因此不需要分页。

我已经覆盖了智能搜索,但我正在努力使用此代码:

    // Prepare the pagination string.  Results X - Y of Z
    $start  = (int) $this->pagination->get('limitstart') + 1;
    $total  = (int) $this->pagination->get('total');
    $limit  = (int) $this->pagination->get('limit') * $this->pagination->pagesTotal;
    $limit  = (int) ($limit > $total ? $total : $limit);
    $pages  = JText::sprintf('COM_FINDER_SEARCH_RESULTS_OF', $start, $limit, $total);
?>
    <br id="highlighter-start" />
    <ul class="search-results<?php echo $this->pageclass_sfx; ?>">
        <?php
        for ($i = 0, $n = count($this->results); $i < $n; $i++):
            $this->result   = &$this->results[$i];
            $layout         = $this->getLayoutFile($this->result->layout);
        ?>
        <?php echo $this->loadTemplate($layout); ?>
        <?php
        endfor;
        ?>
    </ul>

(模板/ HTML / com_finder /搜索/ default_results.php)

它确实计算了结果的总量,那么是否可以只显示而不是for循环?

0 个答案:

没有答案
相关问题