如何在Typo3中对来自远程数据库的数据进行分页?

时间:2018-01-04 12:00:57

标签: pagination typo3 typo3-7.6.x

我使用TYPO3 7 CMS写了一个网站。现在我需要在前端显示数据库内容(如图所示)。但我不知道如何做到这一点。我在TYPO3存储库中搜索了一个相应的插件,找到了cag_tables。但它不适用于版本6.0 ......

enter image description here

1 个答案:

答案 0 :(得分:1)

使用paginate widget viewhelper

<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>

https://fluidtypo3.org/viewhelpers/fluid/master/Widget/PaginateViewHelper.html