Show All Entries - Default Set 10 at a time

Support MB Views Show All Entries - Default Set 10 at a timeResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48232
    Michael FoissetMichael Foisset
    Participant

    I need guidance on how to show all entries. There are only 150+ users. I was able to enter the source code to sort by last name only.

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/media/css/jquery.dataTables.min.css" />
    {% set args = { meta_key: 'publish_account', meta_value: 'yes'} %}
    {% set users_list = mb.get_users( args ) %}
    <Table Header>
    {% for user in users_list|sort((a, b) => a.last_name <=> b.last_name) %}
    <Table Body>
    {% endfor %}
    </tbody>
    </table>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/media/js/jquery.dataTables.min.js"></script>

    #48236
    Michael FoissetMichael Foisset
    Participant

    I figured it out.

    Javascript:
    (function ($) {
    $(document).ready(function () {
    $('#Userslist').DataTable({"pageLength":200});
    });
    })(jQuery);

    CSS:
    .dataTables_wrapper {margin-right: 20px;}
    .dataTables_wrapper .dataTables_filter {margin: 10px;}
    .dataTables_wrapper .dataTables_length {display: none;}
    .dataTables_wrapper .dataTables_paginate {display: none;}

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.