8.4.2: How to paginate same blocks on one page?

Permalink
Anyone know how a list pagination can be used with same blocks on the same page? Where do I use a $bID in the controller and view?

Here's a controller:
$factory = new PaginationFactory($this->app->make(Request::class));
$files = new ItemList();
$files->setItemsPerPage($this->num_files);
$files->setItems($contents);
$paginator = $factory->createPaginationObject($files);
$pagination = $files->displayPagingV2(false, true);
$this->set('files', $files->getPage());
$this->set('pagination', $pagination);
$this->set('paginator', $paginator);

and view:
<?php if ($paginator && $paginator->getTotalPages() > 1) { ?>
    <div class="ccm-search-results-pagination">
        <?php echo $pagination; ?>
    </div>
<?php } ?>

linuxoid
 
linuxoid replied on at Permalink Reply
linuxoid
Looks like the setNameSpace() does the trick