1 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
3 <title>CarbonPHP Documentation
</title>
4 <style type=
"text/css">
11 font-family: "Lucida Sans Unicode", "Lucida Grande";
33 margin: 10px 0 10px 0;
34 list-style-position: inside
;
42 border: 1px dotted
#444;
50 border: 1px solid
#ccc;
60 <h1>Pagination Library
</h1>
62 <p>CarbonPHP's pagination library is very simple to use, and you can customise every aspect of it.
</p>
66 <h1>Pagination Example
</h1>
69 $this-
>load-
>library('pagination');
<br />
71 $config['base_url'] = 'http://www.your-domain.com/index.php/some/page';
<br />
72 $config['total_rows'] = '
400';
<br />
73 $config['per_page'] = '
20';
<br />
75 $this-
>pagination-
>initialise($config);
<br />
77 echo $this-
>pagination-
>create_links();
80 <p>The
<b>$config
</b> array contains any configuration options. It is passed to the
81 <b>$this-
>pagination-
>initialise()
</b> method.
</p>
83 <p>If you do not wish to set the configuration options every time, you can create a configuration file
84 <b>application/config/pagination.php
</b> with the configuration options in.
</p>
88 <h1>Configuration Options
</h1>
90 <p><b>$config['uri_segment']
</b> - This determines which segment of the URI contains the page number.
</p>
92 <p><b>$config['num_links']
</b> - This determines the number of digit links are either side of the current
95 <p><b>$config['full_tag_open']
</b> - This is the opening tag placed of the left of the entire result.
</p>
97 <p><b>$config['full_tag_close']
</b> - This is the closing tag placed at the end of the result.
</p>
99 <p><b>$config['first_link']
</b> - This is the text shown for the first link on the left.
</p>
101 <p><b>$config['first_tag_open']
</b> - This is the tag on the left of the first link.
</p>
103 <p><b>$config['first_tag_close']
</b> - This is the tag on the end of the first link.
</p>
105 <p><b>$config['last_link']
</b> - This is the text shown for the last link on the right.
</p>
107 <p><b>$config['last_tag_open']
</b> - This is the tag on the left of the last link.
</p>
109 <p><b>$config['last_tag_close']
</b> - This is the tag on the end of the last link.
</p>
111 <p><b>$config['next_link']
</b> - This is the text of the next page link.
</p>
113 <p><b>$config['next_tag_open']
</b> - This is the tag on the left of the next page link.
</p>
115 <p><b>$config['next_tag_close']
</b> - This is the tag on the end of the next page link.
</p>
117 <p><b>$config['prev_link']
</b> - This is the text of the previous page link.
</p>
119 <p><b>$config['prev_tag_open']
</b> - This is the tag on the left of the previous page link.
</p>
121 <p><b>$config['prev_tag_close']
</b> - This is the tag on the end of the previous page link.
</p>
123 <p><b>$config['cur_tag_open']
</b> - This is the opening tag for the current page link.
</p>
125 <p><b>$config['cur_tag_close']
</b> - This is the closing tag for the current page link.
</p>
127 <p><b>$config['num_tag_open']
</b> - This is the opening tag for the digit link.
</p>
129 <p><b>$config['num_tag_close']
</b> - This is the closing tag for the digit link.
</p>