TYPO3, Extbase, Paginate

1.3k views Asked by At

I am developing a simple Extbase/Fluid extension for TYPO3 CMS 6.1.17. It works fine, but I am not able to implement a ViewHelper to paginate.

Looking around, I tried to hack some code from News. However I fail to see how (and where) I have to set my TS.

I tried (setup.ts)

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

but then I get error:

Could not analyse class:Myvendor\Myext\ViewHelpers\HeaderDataViewHelper maybe not loaded or no autoloader?

which I do not know how to fix. If I try:

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

I get the FE error:

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

If you spot what I am not seeing, please let me know.

thanks mario

2

There are 2 answers

0
mario On

Solved. When hacking a template for Pagination from News, I overlooked to note occurences of the tag <n:headerData>. To get it parsed, I need to cut&paste corresponding HeaderDataViewHelper.php into my ext.

:-)

0
Jainish On

If you want to use pagination for your custom records than simply use js_paginate extension from typo3 repository http://typo3.org/extensions/repository/view/js_paginate

Just follow the procedure from following URL

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