General pagination in ZF2

EDIT . My question is how to make pagination into a generic view , currently I need to do a few like this on every page where I need pagination set variables

<?php echo ( count($this->paginator) > 0 ) ? $this->paginationControl($this->paginator, 'Sliding', 'administration/pager.phtml', array('url' => $this->url('company'))) : ""; ?> 
+4
source share
1 answer

The dear one you want to do is clearly mentioned in the zf2 documentation: http://framework.zend.com/manual/2.1/en/tutorials/tutorial.pagination.html "Allows you to create partail in the module / Application / view / partial / folder so that we can use the control in all of our modules: The above line shows that if we want to create a common set of pages that will be available for the whole module, make it partial in the application.

+4
source

Source: https://habr.com/ru/post/1492381/


All Articles