PAGINATION

I have many rows result and I don't want to show all page number. I'm using following code,

$currentpage = (int) $this->request->get("page","int");  
$paginator = new Paginator(array(
        "data" => $result,
        "limit" => 15,
        "page" => $currentpage ? $currentpage : 1,
        "showPageList" => false,
        "pageNumber" => 10,
        "pageList" =>array(10,20,50,100)
));
$page = $paginator->getPaginate();
$this->view->setVar("page", $page);
$this->view->pick("product/index");

PAGINATION

Can you format your code?



1.5k
edited Jul '14

You can create a partial view too, and then just pick that in your index view.