summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries/pagination.html
diff options
context:
space:
mode:
authorphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
committerphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
commit0fe54dbaf89a8337d27b9203f74891cf1a799715 (patch)
treece168b3c24788e5a4a31e0cc65b64f54e25ee8a2 /user_guide/libraries/pagination.html
parent3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (diff)
parent3ef65bd7491f847fecdab1acc9687f0e90eee09b (diff)
Merged Alex Bilbies MSSQL changes.
Diffstat (limited to 'user_guide/libraries/pagination.html')
-rw-r--r--user_guide/libraries/pagination.html24
1 files changed, 12 insertions, 12 deletions
diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html
index da07c79be..a6b9287a3 100644
--- a/user_guide/libraries/pagination.html
+++ b/user_guide/libraries/pagination.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -71,27 +71,27 @@ Pagination Class
<code>
$this->load->library('pagination');<br /><br />
$config['base_url'] = 'http://example.com/index.php/test/page/';<br />
-$config['total_rows'] = '200';<br />
-$config['per_page'] = '20';
+$config['total_rows'] = 200;<br />
+$config['per_page'] = 20;
<br /><br />
$this->pagination->initialize($config);
<br /><br />
-echo $this->pagination->create_links();</code>
+echo $this->pagination->create_links();</code>
<h3>Notes:</h3>
-<p>The <var>$config</var> array contains your configuration variables. It is passed to the <dfn>$this->pagination->initialize</dfn> function as shown above. Although there are some twenty items you can configure, at
-minimum you need the three shown. Here is a description of what those items represent:</p>
+<p>The <var>$config</var> array contains your configuration variables. It is passed to the <dfn>$this->pagination->initialize</dfn> function as shown above. Although there are some twenty items you can configure, at
+minimum you need the three shown. Here is a description of what those items represent:</p>
<ul>
- <li><strong>base_url</strong> This is the full URL to the controller class/function containing your pagination. In the example
- above, it is pointing to a controller called "Test" and a function called "page". Keep in mind that you can
+ <li><strong>base_url</strong> This is the full URL to the controller class/function containing your pagination. In the example
+ above, it is pointing to a controller called "Test" and a function called "page". Keep in mind that you can
<a href="../general/routing.html">re-route your URI</a> if you need a different structure.</li>
<li><strong>total_rows</strong> This number represents the total rows in the result set you are creating pagination for.
Typically this number will be the total rows that your database query returned.
</li>
- <li><strong>per_page</strong> The number of items you intend to show per page. In the above example, you would be showing 20 items per page.</li>
+ <li><strong>per_page</strong> The number of items you intend to show per page. In the above example, you would be showing 20 items per page.</li>
</ul>
<p>The <var>create_links()</var> function returns an empty string when there is no pagination to show.</p>
@@ -100,7 +100,7 @@ minimum you need the three shown. Here is a description of what those items rep
<h3>Setting preferences in a config file</h3>
<p>If you prefer not to set preferences using the above method, you can instead put them into a config file.
-Simply create a new file called <var>pagination.php</var>, add the <var>$config</var>
+Simply create a new file called <var>pagination.php</var>, add the <var>$config</var>
array in that file. Then save the file in: <var>config/pagination.php</var> and it will be used automatically. You
will NOT need to use the <dfn>$this->pagination->initialize</dfn> function if you save your preferences in a config file.</p>
@@ -122,9 +122,9 @@ something different you can specify it.</p>
<h4>$config['page_query_string'] = TRUE</h4>
<p>By default, the pagination library assume you are using <a href="../general/urls.html">URI Segments</a>, and constructs your links something like</p>
<p><code>http://example.com/index.php/test/page/20</code></p>
-<p>If you have $config['enable_query_strings'] set to TRUE your links will automatically be re-written using Query Strings. This option can also be explictly set. Using $config['page_query_string'] set to TRUE, the pagination link will become.</p>
+<p>If you have $config['enable_query_strings'] set to TRUE your links will automatically be re-written using Query Strings. This option can also be explictly set. Using $config['page_query_string'] set to TRUE, the pagination link will become.</p>
<p><code>http://example.com/index.php?c=test&amp;m=page&amp;per_page=20</code></p>
-<p>Note that &quot;per_page&quot; is the default query string passed, however can be configured using $config['query_string_segment'] = 'your_string'</p>
+<p>Note that &quot;per_page&quot; is the default query string passed, however can be configured using $config['query_string_segment'] = 'your_string'</p>
<h2>Adding Enclosing Markup</h2>
<p>If you would like to surround the entire pagination with some markup you can do it with these two prefs:</p>