我正在为TYPO3 CMS 6.1.17开发一个简单的Extbase / Fluid扩展。它工作正常,但我无法实现ViewHelper分页。
环顾四周,我试图破解News中的一些代码。但是我没有看到我如何(以及在哪里)设置我的TS。
我试过(setup.ts)
SELECT Z.Company, A,B,C,D
FROM
(SELECT
company,
CASE WHEN service_name= 'A' THEN conversation_type_id END AS 'A'
FROM
services srv
INNER JOIN
conversations con ON srv.id=con.service_id
INNER JOIN company cmp ON con.client_id=cmp.id
INNER JOIN conversation_type typ ON con.conversation_type_id=typ.id
GROUP BY company) Z,
(SELECT
company,
CASE WHEN service_name= 'B' THEN conversation_type_id END AS 'B'
FROM
services srv
INNER JOIN
conversations con ON srv.id=con.service_id
INNER JOIN company cmp ON con.client_id=cmp.id
INNER JOIN conversation_type typ ON con.conversation_type_id=typ.id
GROUP BY company) Y,
(SELECT
company,
CASE WHEN service_name= 'C' THEN conversation_type_id END AS 'C'
FROM
services srv
INNER JOIN
conversations con ON srv.id=con.service_id
INNER JOIN company cmp ON con.client_id=cmp.id
INNER JOIN conversation_type typ ON con.conversation_type_id=typ.id
GROUP BY company) X,
(SELECT
company,
CASE WHEN service_name= 'D' THEN conversation_type_id END AS 'D'
FROM
services srv
INNER JOIN
conversations con ON srv.id=con.service_id
INNER JOIN company cmp ON con.client_id=cmp.id
INNER JOIN conversation_type typ ON con.conversation_type_id=typ.id
GROUP BY company) W
WHERE Z.company=Y.company
AND Z.company=X.company
AND Z.company=W.company
然后我收到错误:
plugin.tx_myext.view.widget.Myvendor\Myext\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:myext/Resources/Private/Templates/
我不知道如何解决。如果我尝试:
Could not analyse class:Myvendor\Myext\ViewHelpers\HeaderDataViewHelper maybe not loaded or no autoloader?
我收到了FE错误:
plugin.tx_myext.view.widget.Myvendor\Myext\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:myext/Resources/Private/Templates/ViewHelpers/Widget/Controller/index.html
如果你发现我没看到的,请告诉我。
感谢 马里奥
答案 0 :(得分:2)
如果您想为自定义记录使用分页而不是简单地使用来自typo3存储库的{js_paginate扩展名http://typo3.org/extensions/repository/view/js_paginate
只需按照以下网址
中的步骤操作即可https://github.com/jainishsenjaliya/js_paginate/blob/master/readme.txt
答案 1 :(得分:0)
<强>解决。强>
当从新闻中攻击分页模板时,我忽略了标记<n:headerData>
的出现。要解析它,我需要将相应的HeaderDataViewHelper.php
剪切并粘贴到我的分机中。
: - )