Pagination Placement. When I have my custom module list in a Table tag it puts the pagination on the top of the list. Any other format puts the pagination on the bottom of the list.
Any other format the Pagination is on the bottom. Even if I keep the same list layout and change the tag from **table** to **div** displays the pagination on the bottom.
Hi @Rhatch. Pagination is placed right after the items output (Layout) so I’m guessing it’s placing it inside your <table> element but outside any tr so it’s probably breaking the HTML layout a bit.
You could try rendering it as a collection instead so that you can include the <table> wrapper within the Layout.
Just tested this and yeah, the pagination div and ul are adding into the <table> element in an invalid way so the browser boots it out of the table.
you can see the different if you view the page source in comparison to inspecting the code with the browser dev tools.
Changing the layout method to a collection works though.
To do this you add object: "collection" to your module component tag.
Then remove the <table> wrapper around the component tag and instead wrap your Layout code like this:
{% for item in this.items %}
<table>
<!-- YOUR EXISTING TABLE ROW LAYOUT -->
<!-- BUT, CHANGE ALL `this` references to `item`. eg: {{this['name']}} change to {{item['name']}} -->
</table>
{% endif %}
The pagination will then be added after the Layout code and therefore outside and underneath your table markup.