PagerfantaBundle

Documentation

Available Views

Default Views

All of the views provided in the pagerfanta/core package are available by default for use with this bundle.

The below table lists the view names and the corresponding class.

View NameClass Name
defaultPagerfanta\View\DefaultView
foundation6Pagerfanta\View\Foundation6View
semantic_uiPagerfanta\View\SemanticUiView
twitter_bootstrapPagerfanta\View\TwitterBootstrapView
twitter_bootstrap3Pagerfanta\View\TwitterBootstrap3View
twitter_bootstrap4Pagerfanta\View\TwitterBootstrap4View
twitter_bootstrap5Pagerfanta\View\TwitterBootstrap5View

Twig View

This bundle provides a Pagerfanta view which renders a Twig template. If you have not already, you will need to install the pagerfanta/twig package.

The below table lists the available templates and the CSS framework they correspond to.

Template NameFramework
@BabDevPagerfanta/default.html.twigNone (Pagerfanta's default view)
@BabDevPagerfanta/foundation6.html.twigFoundation (version 6.x)
@BabDevPagerfanta/semantic_ui.html.twigSemantic UI (version 2.x)
@BabDevPagerfanta/tailwind.html.twigTailwind CSS
@BabDevPagerfanta/twitter_bootstrap.html.twigBootstrap (version 2.x)
@BabDevPagerfanta/twitter_bootstrap3.html.twigBootstrap (version 3.x)
@BabDevPagerfanta/twitter_bootstrap4.html.twigBootstrap (version 4.x)
@BabDevPagerfanta/twitter_bootstrap5.html.twigBootstrap (version 5.x)

The labels of the "Previous" and "Next" buttons are localizable in the Twig templates.

See the Pagerfanta documentation for more information about building a Twig template.

Default View CSS

The bundle comes with basic CSS for the default view so you can get started quickly.

<link rel="stylesheet" href="{{ asset('bundles/babdevpagerfanta/css/pagerfanta.css') }}">

If you are using the AssetMapper component in your application, the CSS file can also be loaded through that component. Please see the Symfony documentation for examples of importing assets from bundles and importing assets outside your /assets directory.