Documentation · ViewHelper reference

Widget / PaginateViewHelper

This ViewHelper renders a Pagination of objects.


required arguments

<f:widget.paginate objects="{blogs}" as="paginatedBlogs">
use {paginatedBlogs} as you used {blogs} before, most certainly inside
a <f:for> loop. </f:widget.paginate>

full configuration

<f:widget.paginate objects="{blogs}" as="paginatedBlogs" configuration="{itemsPerPage: 5, insertAbove: 1, insertBelow: 0, maximumNumberOfLinks: 10}">
use {paginatedBlogs} as you used {blogs} before, most certainly inside
a <f:for> loop. </f:widget.paginate>
= Performance characteristics =
In the above examples, it looks like {blogs} contains all Blog objects, thus
you might wonder if all objects were fetched from the database.
However, the blogs are NOT fetched from the database until you actually use them,
so the paginate ViewHelper will adjust the query sent to the database and receive
only the small subset of objects.
So, there is no negative performance overhead in using the Paginate Widget.
  • Tag usage example

    <f:widget.paginate objects="[anySimpleType]" as="foo" configuration="{foo: 'bar'}">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {f:widget.paginate(objects: [anySimpleType], as: 'foo', configuration: {foo: 'bar'})}


Argument Description Type
as string
configuration array
objects anySimpleType
Required attribute

Revision history

commit df8a85a1432b05db1892a13fb8e11fd2a1652443
Author: Bastian Waidelich <*****>
Date:   Fri Nov 5 11:10:06 2010 +0000

    [+FEATURE] First step of "Fluid widget" backport
    This is the first step of the Widget backport (#8773). This contains all the core classes that are required for the widget implementation and two exemplary Widget ViewHelpers "widget.paginate" and "widget.autocomplete".
    Note: Ajax widgets are not yet working!!
    Relates to: #8773
    Relates to: #10568

commit 3f0d0e5a070c5602570f393c592583133f83e9d1
Author: Bastian Waidelich <*****>
Date:   Sun Nov 14 16:09:43 2010 +0000

    [+BUGFIX] Fluid (ViewHelpers): Fixed Widget URI generation in ViewHelpers/Link/WidgetViewHelpers
    [~TASK] Fluid (ViewHelpers/Widget): Tweaked PaginateViewHelper: Minor refactoring of controller & template

commit 4c2388a2d4d778a5259b3131b8b13cc389d741f4
Author: Bastian Waidelich <*****>
Date:   Wed Nov 17 08:19:29 2010 +0000

    [+FEATURE] Fluid (ViewHelpers): the subject argument of the count ViewHelper is now optional so you can use it like {objects -> f:count()}
    [+BUGFIX] Fluid (ViewHelpers): Fixed inline documentation of widget.autocomplete ViewHelper. This fixes #10882
    [+TASK] Fluid (ViewHelpers): Added some more inline documentation for cObject, widget.paginate, widget.autocomplete & count ViewHelpers

commit 472451987ca0530fa5828bb0b79fcafa2f905a35
Author: Bastian Waidelich <*****>
Date:   Fri Nov 19 20:58:09 2010 +0000

    [-TASK] Fluid: R*****@scope annotations as they are not used in v4

commit 2ba9ee2889641b87bee305ffb5d9dec964f3b977
Author: Henjo Hoeksma <*****>
Date:   Mon Nov 7 12:00:29 2011 +0100

    [FEATURE] maximumNumberOfLinks argument in paginate widget
    This adds a new widget option configuration.maximumNumberOfLinks
    to the widget.paginate ViewHelper.
    This is a backport of the respective feature of the FLOW3
    Resolves: #31632
    Change-Id: I6716404d6ae3be576b9978209b78d952c33284f9

commit fd09d197fa8886b97cb20aa9573f39cd08ce989e
Author: Bastian Waidelich <*****>
Date:   Thu Nov 10 18:27:58 2011 +0100

    [TASK] S*****@author annotations
    This backports three recent changes of the TYPO3.Fluid package:
    - R*****@license annotation from files (290f4f5)
    - Simplify license header in PHP files (14bacba)
    - D*****@author tags from source code (9c2e837)
    This should not contain any functional change!
    Change-Id: I9376dca4af78c4f0f82413011d115b8ad04634dd

commit ca40f8a066da4ea3c849d74f68a9bc73758976c5
Author: dkd-egerer Sascha Egerer <*****>
Date:   Sat Apr 14 21:43:10 2012 +0200

    [TASK] Remove trailing whitespace
    There must be no empty lines after the closing
    PHP tag. Empty lines after closing tags break
    output compression in PHP and/or result in AJAX
    Change-Id: I0484ca29d8134d0828cf30880d5aafd43ed9d78e
    Resolves: #36076
    Releases: 6.0
    Reviewed-by: Ingo Pfennigstorf
    Tested-by: Ingo Pfennigstorf
    Reviewed-by: Daniel Lorenz
    Tested-by: Daniel Lorenz
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn

commit ec3891d8d4e339d8319428211207e6201be9fd73
Author: Thomas Maroschik <*****>
Date:   Wed Oct 17 21:18:26 2012 +0200

    [TASK][WIP] Move non class code back to source files
    Change-Id: I620d2e61860142cdc89cc83474c95542799961c0

commit 554e8f890dcc0dd86a27518b58e2b54be26fd37e
Author: Thomas Maroschik <*****>
Date:   Wed Oct 17 22:20:17 2012 +0200

    [TASK] Namespace classes
    Change-Id: Ia7432e1c923826ed58206bca15fb94509adbd508

commit 9d13dedf017b614b834261b1bf5d4acb2201f1d4
Author: Alexander Schnitzler <*****>
Date:   Fri Nov 16 19:49:02 2012 +0100

    [CLEANUP] Replace FLOW3 with TYPO3 Flow
    Releases: 6.0
    Fixes: #43036
    Change-Id: I62df23587301b4cde3ddeae3686b34f54fe1182e
    Reviewed-by: Alexander Schnitzler
    Tested-by: Alexander Schnitzler

commit 9d46e6932d35c79bf87c96fa38b8e537c4192f23
Author: Alexander Schnitzler <*****>
Date:   Tue Nov 20 16:27:02 2012 +0100

    [CLEANUP] Adjust code to CGL and fix small namespace bugs
    * whitespaces, tabs and blank line issues
    * bool -> boolean
    * int -> integer
    * fix wrong namespace annotations
    Fixes: #43157
    Releases: 6.0
    Change-Id: I8397948e19248db029d8efd1555ee56e4982742d
    Reviewed-by: Helmut Hummel
    Tested-by: Helmut Hummel

commit 77f29a3c69a7cbb27b34072754aa503bace6c9f1
Author: Christian Kuhn <*****>
Date:   Tue Oct 1 14:40:56 2013 +0200

    [TASK] Remove closing PHP tags
    Change-Id: Iaa92566c53301e49396fc9fb26b0b339c48d567b
    Resolves: #52360
    Releases: 6.2
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn
    Reviewed-by: Ernesto Baschny
    Tested-by: Ernesto Baschny
    Reviewed-by: Anja Leichsenring
    Tested-by: Anja Leichsenring

commit e316f7cd6dc115103bfab9336fd48fe0e97af680
Author: Stefan Froemken <*****>
Date:   Tue Sep 17 10:59:14 2013 +0200

    [TASK] Change injectMethods to annotations
    Change injectMethods as already done in extbase
    to inject annotations
    Resolves: #52040
    Releases: 6.2
    Change-Id: I1e4ba873981c4692cc0b3d867bd3756934661a90
    Reviewed-by: Stefan Neufeind
    Tested-by: Stefan Neufeind
    Reviewed-by: Markus Klein
    Tested-by: Markus Klein