weboftalent / child-pagination
Pagination Helper for Children Pages in SilverStripe
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Type:silverstripe-module
Requires
- silverstripe/framework: ~3.1
This package is auto-updated.
Last update: 2024-10-27 08:39:59 UTC
README
##Introduction This modules provides shorthand methods to incorporate paging of children in a folder
##Usage
Listing Items on a Page
In your template do the following:
<% control PagedChildren(*ClassName*, *NumberToShowPerPage*) %>
For example, the following will show 8 NewsItem objects per rendered page.
<% control PagedChildren(NewsItem,8) %>
Render the list of items as you see fit for your website using normal templating code.
Pagination Links
Simply add this line to include pagination links (1,2,3... etc) in your template
<% include ChildPagination %>