URL for first number page in codeigniter paginatio

2019-02-20 03:40发布

问题:

How can put url for link number 1 like other links, in codeigniter pagination, when start(refresh) page

« First < 1 2 3 4 5 > Last »

by default number 1 is <strong>1</strong>. i want it same like other number get link page in first load page.

How is it?

回答1:

It's in the config for pagination. From the docs ( http://codeigniter.com/user_guide/libraries/pagination.html ):

//Customizing the "Current Page" Link

$config['cur_tag_open'] = '<a href="'.base_url().$this->uri->uri_string().'">';
$config['cur_tag_close'] = '</a>';

You can change the values of these to <span> or whatever else you choose.



回答2:

Wow this is an amazingly difficult question to read - But I think the general idea is you want to customize the look / functionality of your CI pagination.

Since I barely understand what you're asking, here is the obvious thing to do:

http://codeigniter.com/user_guide/libraries/pagination.html

That link goes over the pagination class clearly.

I may be able to clarify more if you clean up the question a bit.



回答3:

CodeIgniter allows you to customize the First Link .

You can change the opening and closing tags of the First Link .

$config['first_tag_open'] = '<div>';
$config['first_tag_close'] = '</div>';

So just find out what the other links use by default and use them as your opening and closing tags ..



回答4:

    $config['cur_tag_open']='<li><a href="[removed]void(0);" class="page_active">';
    $config['cur_tag_close']='</a></li>';