weboftalent/child-pagination

Pagination Helper for Children Pages in SilverStripe

2.0.0 2016-01-20 06:50 UTC

This package is auto-updated.

Last update: 2024-11-27 08:52:36 UTC


README

#Paged Child Helper Build Status Scrutinizer Code Quality Code Coverage Build Status codecov.io

Latest Stable Version Latest Unstable Version Total Downloads License Monthly Downloads Daily Downloads

Dependency Status Reference Status

codecov.io

##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 %>