<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/505bef35b56/integration/foundation/dataTables.foundation.css">
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/foundation/dataTables.foundation.js"></script>

<script type="text/javascript">

$(document).ready(function() {
    $('{{target}}').DataTable({
        "lengthMenu": [[25, 50, -1], [25, 50, "All"]],
    {% if hide_length %}"bLengthChange": false,{% endif %}
    {% if hide_page %}"bPaginate": false,{% endif %}
    {% if sort %}"order": [[ {{ sort }}, "{{ order }}" ]]{% endif %}
    {% if disable_ordering %}"ordering": false{% endif %}
    });
} );

</script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/505bef35b56/integration/foundation/dataTables.foundation.css">
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/505bef35b56/integration/foundation/dataTables.foundation.js"></script>

<script type="text/javascript">

$(document).ready(function() {
    $('{{target}}').DataTable({
        "lengthMenu": [[25, 50, 10, -1], [25, 50, 10, "All"]],
    {% if hide_length %}"bLengthChange": false,{% endif %}
    {% if hide_page %}"bPaginate": false,{% endif %}
    {% if sort %}"order": [[ {{ sort }}, "{{ order }}" ]]{% endif %}
    {% if disable_ordering %}"ordering": false{% endif %}
    {% if page_length %}"pageLength": {{ page_length }}{% endif %}
    });
} );

</script>
Allow user to set default datatable length.
Allow user to set default datatable length.

