我试图达到以下效果:
Prev 1 of 4 Next
我尝试设置以下$config
选项:
$config['num_links'] = 0;
但我收到以下错误:
您的链接数必须是正数。
我的配置选项设置为:
$config['base_url'] = "/browse/tag/$tid/";
$config['total_rows'] = $num_items;
$config['per_page'] = $max_items;
$config['first_link'] = FALSE;
$config['last_link'] = FALSE;
$config['uri_segment'] = 4;
$config['use_page_numbers'] = TRUE;
$config['display_pages'] = TRUE;
$config['num_links'] = 0; # this doesn't work
$config['prev_link'] = 'Previous';
$config['next_link'] = 'Next';
$config['cur_tag_open'] = '<span>';
$config['cur_tag_close'] = " of $pages</span>";
$config['full_tag_open'] = '<div class="previousnext">';
$config['full_tag_close'] = '</div>';
如果我更改num_links
为 1,我显然会得到:
Prev 1 2 of 4 3 Next
如果我关闭,display_pages
我会得到:
Prev Next
在这个阶段,我想避免修改核心代码。