Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 763 Bytes

nglayouts_collection_pager.rst

File metadata and controls

21 lines (14 loc) · 763 Bytes

nglayouts_collection_pager

This function is used to render a pager for a collection:

{{ nglayouts_collection_pager(pager, block, 'default') }}

This will render the pager for provided collection (specified by the block and collection identifier (default)). pager variable is an instance of Pagerfanta\Pagerfanta class, provided to block view templates automatically by Netgen Layouts.

The default template is @NetgenLayouts/collection/default_pager.html.twig and you can override it by providing a fourth parameter which is a hash of configuration options:

{{ nglayouts_collection_pager(pager, block, 'default', {template: '@App/my_pager.html.twig'}) }}