【问题标题】:TYPO3, Extbase, PaginateTYPO3,Extbase,分页
【发布时间】:2016-05-08 22:48:09
【问题描述】:

我正在为 TYPO3 CMS 6.1.17 开发一个简单的 Extbase/Fluid 扩展。它工作正常,但我无法实现 ViewHelper 进行分页。

环顾四周,我试图破解来自News 的一些代码。但是我看不到我必须如何(以及在​​哪里)设置我的 TS。

我试过了(setup.ts)

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?

我不知道如何解决。如果我尝试:

plugin.tx_myext.view.widget.Myvendor\Myext\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:myext/Resources/Private/Templates/ViewHelpers/Widget/Controller/index.html

我收到 FE 错误:

No template was found. View could not be resolved for action "index" in class "Myvendor\Myext\ViewHelpers\Widget\Controller\PaginateController"

如果您发现我没有看到的内容,请告诉我。

谢谢 马里奥

【问题讨论】:

    标签: pagination typo3 view-helpers typo3-6.1.x


    【解决方案1】:

    如果您想对自定义记录使用分页,而不是简单地使用来自typo3 存储库http://typo3.org/extensions/repository/view/js_paginate 的 js_paginate 扩展名

    只需按照以下网址中的程序进行操作

    https://github.com/jainishsenjaliya/js_paginate/blob/master/readme.txt

    【讨论】:

      【解决方案2】:

      已解决。 在从新闻中破解分页模板时,我忽略了标记 <n:headerData> 的出现。要解析它,我需要将相应的HeaderDataViewHelper.php 剪切并粘贴到我的分机中。

      :-)

      【讨论】:

        猜你喜欢
        • 2017-07-23
        • 2012-05-28
        • 1970-01-01
        • 2014-02-04
        • 2013-06-17
        • 1970-01-01
        • 2013-08-26
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多