Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Pagination: Max per Page / Pages Total


Go to End


2 Posts   1851 Views

Avatar
MattKenefick

Community Member, 13 Posts

2 September 2008 at 8:33am

I read the tutorial for Pagination but I don't know if I overlooked or not.. but how do you tell the system what the max per page is?

And after that, is there a variable for # of pages ?

Avatar
Willr

Forum Moderator, 5523 Posts

2 September 2008 at 9:42am

Its set in the PHP method NewsArticles()

$limit = "{$SQL_start},2"

That line says from the start value (which changes depending on what page your on) then get 2 items. If you want more / less items you can edit that 2.