Navigation
eZ Documentation Center
 

This is outdated documentation made for eZ Publish Platform 5.2. It is being moved into the eZ Publish 5.x documentation, so please go there for most up-to-date documentation.

Skip to end of metadata
Go to start of metadata

Version compatibility

This recipe is compatible with eZ Publish 5.2 / 2013.11

Description

When listing content (e.g. blog posts), pagination is a very common use case and is usually painful to implement by hand.

For this purpose eZ Publish 5 recommends the use of Pagerfanta library and proposes adapters for it.

Usage

my_template.html.twig

For more information and examples, have a look at PagerFanta documentation.

Adapters

Adapter class nameDescription
eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchAdapter
Makes the search against passed Query and returns Content objects.
eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchHitAdapter
Same as ContentSearchAdapter but returns instead SearchHit objects.

 

 

  • No labels