首页 > 解决方案 > 错字3分页小部件不以 uid 1 开头,以最后一个 uid 之后的下一个 uid 开头

问题描述

我正在使用分页小部件(从 sysext 复制代码,并将路径更改为我的扩展程序)。我在我的模板中设置它是这样的:

<f:widget.paginate objects="{therapeuts}" as="paginatedtherapeuts" configuration="{itemsPerPage: 9, insertAbove: 1, insertBelow: 1, maximumNumberOfLinks: 10, addQueryStringMethod: 'POST,GET'}">
    <f:for each="{paginatedtherapeuts}" as="therapeut">
    ...
    </f:for>
</f:widget.paginate>

前端显示了应显示的 9 个“条目”。但这些条目是空的。使用 f:debug 进行检查显示以下内容:

TYPO3\CMS\Extbase\Persistence\Generic\QueryResultprototypeobject (9 items)
0 => ...\Therapeutprototypepersistent entity (uid=17454, pid=0)
1 => ...\Therapeutprototypepersistent entity (uid=17455, pid=0)
2 => ...\Therapeutprototypepersistent entity (uid=17456, pid=0)
3 => ...\Therapeutprototypepersistent entity (uid=17457, pid=0)
4 => ...\Therapeutprototypepersistent entity (uid=17458, pid=0)
5 => ...\Therapeutprototypepersistent entity (uid=17459, pid=0)
6 => ...\Therapeutprototypepersistent entity (uid=17460, pid=0)
7 => ...\Therapeutprototypepersistent entity (uid=17461, pid=0)
8 => ...\Therapeutprototypepersistent entity (uid=17462, pid=0)

这是错误的。我在从 uid 1 到 17453 的 {therapeuts} 对象中有 17453 个条目。

widget.paginate 现在显示不存在的 uid。为什么或我做错了什么,分页小部件不以 uid 1 开头?

感谢您的任何帮助

标签: widgettypo3fluidextbasepagination

解决方案


推荐阅读