/** * Overview of news * * @Privilege("default") */ public function renderDefault() { $news = $this->news->getOrderedNews(); $vp = new \VisualPaginator($this, 'vp'); $page = $vp->page; $paginator = $vp->getPaginator(); $paginator->setItemCount($news->count()); $paginator->setItemsPerPage(50); $paginator->setPage($page); $this->template->news = $news->limit($paginator->getLength(), $paginator->getOffset()); }