Is it possible to force pagination to generate ul li a elements?

Is it possible to force pagination to generate ul li a elements?

josesoaresjosesoares Posts: 2Questions: 1Answers: 0
edited March 2021 in Free community support

I apologize if this question doesn't follow the required structure.
But I'm having a weird problem where the pagination being rendered is comprised of divs and a tags
i read that it is normal, but because of that the styling from datatables.bootstrap4.css isn't applying to the resulting block of html.

        $dtTable.dataTable({
        dom: '<"row justify-content-between"<"col-auto"><"col-auto">><"table-responsive"t>ip',
            renderer: "bootstrap",
            columnDefs: [{
                orderable: false,
                targets: 0
            }],
            pageLength: 12,
            order: [],
            language: {
                paginate: {
                    previous: '<i class="fas fa-chevron-left"></i>',
                    next: '<i class="fas fa-chevron-right"></i>'
                }
            }
});

and the table currently only having two rows (not enough to create another page)
outputs this pagination structure

                <div class="dataTables_paginate paging_simple_numbers" id="dtTable_paginate">
                    <a class="paginate_button previous disabled" aria-controls="dtTable" data-dt-idx="0" tabindex="0" id="dtTable_previous"><i class="fas fa-chevron-left"></i></a>
                    <span>
                        <a class="paginate_button current" aria-controls="dtTable" data-dt-idx="1" tabindex="0">1</a>
                    </span>
                    <a class="paginate_button next disabled" aria-controls="dtTable" data-dt-idx="2" tabindex="0" id="dtTable_next"><i class="fas fa-chevron-right"></i></a>
                </div>

I understand that you guys cant really help me much since I haven't provided functional code, but any thoughts that might hint me in the right way are more than welcome.

thank you in advance.

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • josesoaresjosesoares Posts: 2Questions: 1Answers: 0

    I have just fixed this. It must have been something related to file dependencies.
    I just the download wizard to get me the functionalities i needed an now it works, its also generating ul li a blocks structure.
    hope this helps someone with the same problem.

  • knshafeeqknknshafeeqkn Posts: 1Questions: 0Answers: 0

    @josesoares Which functionality you are added to get pagination in ul li a structure?

Sign In or Register to comment.