我想问一下Joomla的分页
我的pagination.php在下面;
<?php
defined('_JEXEC') or die('Restricted access');
function pagination_list_footer($list)
{
$html = "<del class=\"container\"><div class=\"pagination\">\n";
// $html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>";
$html .= $list['pageslinks'];
$html .= "\n<div class=\"limit\">".$list['pagescounter']."</div>";
$html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"".$list['limitstart']."\" />";
$html .= "\n</div></del>";
return $html;
}
function pagination_list_render($list)
{
$html = '';
if ($list['start']['active'])
$html .= '<div class="pag_button pag_start">'.$list['start']['data'].'</div>';
else
$html .= '<div class="pag_button pag_start poff">'.$list['start']['data'].'</div>';
if ($list['previous']['active'])
$html .= '<div class="pag_button pag_previous">'.$list['previous']['data'].'</div>';
else
$html .= '<div class="pag_button pag_previous poff">'.$list['previous']['data'].'</div>';
$html .= '<div class="pag_button plist">';
foreach($list['pages'] as $page)
$html .= $page['data'];
$html .= '</div>';
if ($list['next']['active'])
$html .= '<div class="pag_button pag_next">'.$list['next']['data'].'</div>';
else
$html .= '<div class="pag_button pag_next poff">'.$list['next']['data'].'</div>';
if ($list['end']['active'])
$html .= '<div class="pag_button pag_end">'.$list['end']['data'].'</div>';
else
$html .= '<div class="pag_button pag_end poff">'.$list['end']['data'].'</div>';
return $html;
}
function pagination_item_active(&$item)
{
return '<a href="'.$item->link.'">'.$item->text.'</a>';
}
function pagination_item_inactive(&$item)
{
return "<span>".$item->text."</span>";
}
?>
例如,两个页面的分页显示为1,2
但是对于1000页。我不想指出所有数字,因为它将占用页面中的巨大空间。 相反,我希望它看起来像这样;
1,2,3,4,5,6,7,8,9,10 ... 1000-在10之后放置三个点
有可能还是我该怎么做?