1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-28 01:54:15 +01:00
DataTables/examples_src/basic_init/alt_pagination.xml

37 lines
1.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html">
<css lib="datatables" />
<js lib="jquery" />
<js lib="datatables" />
<title>Alternative pagination</title>
<js><![CDATA[
$(document).ready(function() {
$('#example').dataTable( {
"paginationType": "full_numbers"
} );
} );
]]></js>
<info><![CDATA[
The default page control presented by DataTables (forward and backward buttons with up to 7 page numbers in-between) is fine for most situations, but there are cases where you may wish to customise the options presented to the end user. This is done through DataTables' extensible pagination mechanism, the `dt-init paginationType` option.
There are four built-in options for which pagination controls DataTables should show:
* `simple` - 'Previous' and 'Next' buttons only
* 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
* `full` - 'First', 'Previous', 'Next' and 'Last' buttons
* `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers
The language strings of 'First', 'Previous' etc can be optionally through the internationalisation options of DataTables; `dt-init first`, `dt-init previous` etc.
Additional options for the buttons that are shown can be added through the use of pagination type plug-ins. Furthermore, how the buttons are actually shown can be altered through the use of plug-in pagination renderers.
The example below shows the `full_numbers` type of pagination.
]]></info>
</dt-example>