I’ve been trying to use Loop Pagination with content shown in a HTML loop, but what actually happens is that the HTML table gets duplicated twice by the ajax code. How can we do this correctly?
I’m not sure I understand exactly what are you saying. Would you mind providing more details about this? Some screenshots would be useful for me to understand it and replicate it.
If I then select page 2, I get the new content (the various tr and td elements) inserted in a div at the top of the main page content, before the table:
great, thank you for the detailed answer! I’ve been able to replicate it on my end, I’ll let you know if I can come up with a workaround for this or if it is a bug.
Hi Chris,
I know it’s been a while. We want to resolve all of our bugs so you guys can enjoy the plugin at its best; however, there were more time-pressing issues, and we still need to fix this.
On the other hand, I want to ensure you know that your issue has not been forgotten and is definitely on our to-do list. Just spoke with the devs the other week, so we will get it fixed soon!
Hi @chrisnappin - I’ve tried to solve this, and found that there’s a technical limitation that prevents supporting pagination within a table element.
What’s happening is that L&L needs a div element to know where to render the paginated items, but the browser moves it to before the table because only certain elements like tr are allowed to be direct children of table.
There might be a tricky workaround, to detect when the pagination is within a table and pass some information via JavaScript so that it knows which rows are paginated items, and to replace them directly instead of using the div container. However, this is complex and requires extending how pagination works on both the server and browser sides.
In the meantime, probably it’s necessary to rebuild the table without using the table element to get around its limitation, to be able to have paginated rows.