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 ?


E.G :

PAGE 1 of 200 | < (prev.) | >(next)

PAGE 5 of 200 | < (prev.) | >(next)


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. ?????????

Thank You,
Uresh Patel
#2

[eluser]Otemu[/eluser]
Hi,

You can use different pagination config array settings for your admin panel and your site within the controller. To customise the actually look then just apply different css styles. have some default pagination styles, then depending if your in admin or just the site apply specific styles, either using a id selector or separate style sheet.

Hope that helps
#3

[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']   = '&lsaquo; 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