在Codeigniter 2.2.0分页菜单中没有列表标签

时间:2014-08-04 10:21:51

标签: php codeigniter pagination

在Codeigniter 2.2.0中,我生成了分页菜单,我看到2到4之间的元素没有...标签:

<ul class="pagination">
  <li class="active">1</li>
  &nbsp;<a href="http://local-ci22.com/admin/hostel/index/page/2">2</a>
  &nbsp;<a href="http://local-ci22.com/admin/hostel/index/page/3">3</a>
  &nbsp;<a href="http://local-ci22.com/admin/hostel/index/page/4">4</a>
  <li class="next"><a href="http://local-ci22.com/admin/hostel/index/page/2">&gt;</a></li>
  <li><a href="http://local-ci22.com/admin/hostel/index/page/7">Last</a></li>
</ul>

在配置文件中:

$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['first_link'] = 'First';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';

$config['next_tag_open'] = '<li class="next">';
$config['next_tag_close'] = '</li>';
$config['prev_tag_open'] = '<li class="prev">';
$config['prev_tag_close'] = '</li>';

$config['last_link'] = 'Last';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';

$config['cur_tag_open'] = '<li class="active">';
$config['cur_tag_close'] = '</li>';

$config['next_link'] = '&gt;';
$config['prev_link'] = '&lt;';

我错过了哪些标签?

谢谢!

1 个答案:

答案 0 :(得分:0)

你错过了&#34;数字&#34;链接:

documentation复制(从div更改为li,以满足您的需求):

$config['num_tag_open'] = '<li>';

&#34;数字&#34;的开头标记链接。

$config['num_tag_close'] = '</li>';

&#34;数字&#34;的结束标记链接。