簡體   English   中英

TYPO3,Extbase,分頁

[英]TYPO3, Extbase, Paginate

我正在為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"

如果您發現我沒看到的內容,請告訴我。

謝謝馬里奧

如果您要對您的自定義記錄使用分頁,而不是簡單地使用來自typo3存儲庫http://typo3.org/extensions/repository/view/js_paginate的 js_paginate擴展名

只需按照以下網址中的步驟操作

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

解決了。 從新聞中竊取分頁模板時,我忽略了標記<n:headerData> 要對其進行解析,我需要將相應的HeaderDataViewHelper.php剪切並粘貼到我的ext中。

:-)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM