Is there a doc for creating pagination on 2.4.7 can't find anything?
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.
The closest there is is the doc block comment for DataObjectSet::PaginationSummary()
Hey thanks for the reply simon_w, after looking through this i'm still struggling to get it to work. You can't use children for the pagination? eg. Children.PaginatedSummary(1) so i'm trying to create a function that grabs all of the children so it would be like AllNewsPosts.PaginatedSummary(1), however I don't think I'm doing this right either as its not working correctly. Any advice?
function AllNewsPosts($num=1) {
$news = DataObject::get_one("NewsHolder");
return ($news) ? DataObject::get("NewsEntry", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}
Used this article to get it working http://www.ssbits.com/tutorials/2010/paginating-a-filtered-dataobjectset/