我的代码是
$config['full_tag_open'] = '<ul class="pagination"> ';
$config['full_tag_close'] = '</ul><!--pagination-->';
$config['first_link'] = '« First';
$config['first_tag_open'] = '<li class="prev page">';
$config['first_tag_close'] = '</li>';
$config['last_link'] = 'Last »';
$config['last_tag_open'] = '<li class="next page">';
$config['last_tag_close'] = '</li>';
$config['next_link'] = 'Next →';
$config['next_tag_open'] = '<li class="next page">';
$config['next_tag_close'] = '</li>';
$config['prev_link'] = '← Previous';
$config['prev_tag_open'] = '<li class="prev page">';
$config['prev_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li ><a class="mj_blackbtn" href="">';
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li class="page">';
$config['num_tag_close'] = '</li>';
这里链接
告诉我特别的css只显示10个链接并隐藏除10之外的所有链接,哪个链接处于活动状态应该始终只显示10个链接,我尝试了$ Confiig ['num_links'],但它发布了css,它保持10活跃之前和之后的10个
答案 0 :(得分:0)
我认为你不能显示10个链接,因为如果你在第5页,那么它应该显示什么?
1 2 3 4 [5] 6 7 8 9 10
哈?
问题是CI总是显示之前的链接和之后的链接,我认为你应该设置
$config['num_links'] = 4;
显示9个链接而不是10个。
答案 1 :(得分:0)
试试这个您可以在Codeigniter
上定义当前页面并管理控制器中的页面。
$config["cur_page"] = $your_last_page_number;