Delete
Setting
Add New Item
Menu List
Title | Content Type | Order | Action | ||||||
---|---|---|---|---|---|---|---|---|---|
{{kb_content.name}} {{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
{{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
No record |
Step 8: Grails pagination
This is complete tutorial to build an application using grails 3.x. There are several parts of tutorial where every part has a specific objective and several steps. So it is a step by step tutorial to build a complete application using grails 3.x.
Grails's paginator is integrated with the query builder and Eloquent ORM and provides convenient, easy-to-use pagination of database results out of the box. The HTML generated by the paginator is compatible with the Bootstrap CSS framework.
In this example, for pagination, we need to set limit in the controller. we will paginate the Contact model with 5 items per page. So we can set this as like
$contacts = Contact::paginate(5);
For Displaying Pagination Results in the view, just write {{ $users->links() }} which will render using blade and the HTML generated by the links method is compatible with the Bootstrap CSS framework.
There are several ways to paginate items. For more - https://grails.com/docs/5.4/pagination