效果:
控制器中初始化部分:
$config[‘full_tag_open’] = ‘
‘;
$config[‘full_tag_close’] = ‘
‘;
$config[‘first_link’] = ‘第一页’;
$config[‘first_tag_open’] = ‘
$config[‘first_tag_close’] = ‘
‘;//“第一页”链接的关闭标签。
$config[‘last_link’] = ‘尾页’;//你希望在分页的右边显示“最后一页”链接的名字。
$config[‘last_tag_open’] = ‘
$config[‘last_tag_close’] = ‘
‘;//“最后一页”链接的关闭标签。
$config[‘next_link’] = ‘下一页’;//你希望在分页中显示“下一页”链接的名字。
$config[‘next_tag_open’] = ‘
$config[‘next_tag_close’] = ‘
‘;//“下一页”链接的关闭标签。
$config[‘prev_link’] = ‘上一页’;//你希望在分页中显示“上一页”链接的名字。
$config[‘prev_tag_open’] = ‘
$config[‘prev_tag_close’] = ‘
‘;//“上一页”链接的关闭标签。
$config[‘cur_tag_open’] = ‘
$config[‘cur_tag_close’] = ‘
‘;//“当前页”链接的关闭标签。
$config[‘num_tag_open’] = ‘
$config[‘num_tag_close’] = ‘
‘;
$this->pagination->initialize($config);
视图中样式表:
#pagelist ul li { float:left; border:1px solid #e0691a; height:20px; line-height:20px; margin:0px 2px;}
#pagelist ul li a,
.current { background:#e0691a; display:block; padding:0px 6px; font-weight:bold;}
视图中分页的地方:
- pagination->create_links();?>