pagination of child pages only

Permalink
Hi,
is there some way to get the pagination block to paginate the child pages of a particular page only, rather than all pages?
i.e.
parent page
- child 1
- child 2
- child 3
pagination on child page 2:
< 1 (2) 3 >

Thanks,
Una

 
linuxoid replied on at Permalink Reply
linuxoid
The paginator paginates items of a PageList. You have to filter the PageList to child pages of a certain page.

I have not tried this, but try something like this
$list = new PageList();
$children = $list->filterByParentID($cParentID);
$factory = new PaginationFactory($this->app->make(Request::class));
$paginator = $factory->createPaginationObject($children);
$pagination = $paginator->renderDefaultView();
$this->set('children', $paginator->getCurrentPageResults());
fatcatsanonymous replied on at Permalink Reply
Hi Linuxoid,
thanks for your suggestion, but I mean't the next previous block rather than the paginator in the page list.
Thanks,
Una