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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2158 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.