Welcome Guest, Not a member yet? Register   Sign In
Pagination Style
#1

[eluser]Uresh Patel[/eluser]
Respected,

I have successfully created CI's default Pagination functionality and working fine.
But i want to put pagination with some different style.I am attaching the style with this.experts please have a look and let me know is it possible to perform like this in CI ?


Thank You,
Uresh Patel
#2

[eluser]Uresh Patel[/eluser]
HI,

i found little help for Hiding the Pages.

If you wanted to not list the specific pages (for example, you only want "next" and "previous" links), you can suppress their rendering by adding:
$config['display_pages'] = FALSE;

Ya i move ahead but new issue with is.
I have front end website layout have different pagination style.
I have admin panel end layout have different pagination style from front end.

How to configure both differently. ?????????
#3

[eluser]noideawhattotypehere[/eluser]
Code:
$config['base_url'] = 'http://example.com/index.php/test/page/';
$config['total_rows'] = 200;
$config['per_page'] = 20;
$this->pagination->initialize($config);
This will initialize pagination with config as $config array, then visit: http://ellislab.com/codeigniter/user-gui...ation.html
and see whats configurable, you can add classes etc to diffrent elements then style them with css.
#4

[eluser]Uresh Patel[/eluser]
I solve issue by doing like ....create a separate method for Admin pagination and will call to every method where it required.


Code:
function paginationConfig($total_rows,$uri_segment,$base_url){
    //paging
    $this->load->library('pagination');
    $config['base_url'] = base_url() . $base_url;
    $config['total_rows'] = $total_rows;
    $config['per_page'] = 5;
    $config['uri_segment'] = 4;
    $base_urlpath = base_url();
    $config['first_link']   = '‹ First';
    $config['next_link']   = "<img src='".$base_urlpath."public/backend/images/next.png' />";
    $config['prev_link']   = "<img src='".$base_urlpath."public/backend/images/previous.png' />";
    $config['last_link']   = 'Last &rsaquo;';
    $config['full_tag_open']  = '';
    $config['full_tag_close']  = '';
    $config['first_tag_open']  = '';
    $config['first_tag_close']  = '&nbsp;';
    $config['last_tag_open']  = '&nbsp;';
    $config['last_tag_close']  = '';
    $config['first_url']   = ''; // Alternative URL for the First Page.
    $config['cur_tag_open']   = '&nbsp;<strong>';
    $config['cur_tag_close']  = '</strong>';
    $config['next_tag_open']  = '&nbsp;';
    $config['next_tag_close']  = '&nbsp;';
    $config['prev_tag_open']  = '&nbsp;';
    $config['prev_tag_close']  = '';
    $config['num_tag_open']   = '&nbsp;';
    $config['num_tag_close']  = '';

    $config['display_pages'] = FALSE;

    $this->pagination->initialize($config);
  }




Theme © iAndrew 2016 - Forum software by © MyBB