kaystrobach / typo3-polyfill-paginateviewhelper
Polyfill for the removed paginate ViewHelper
Installs: 2 097
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- typo3/cms-core: ^11.5
README
Table of Contents
About The Project
The projects provides a polyfill for the paginateViewHelper widget, which was deprecated in TYPO3 v10 and finally removed in TYPO3 v11+.
<f:widget.paginate objects="{blogs}" as="paginatedBlogs" configuration="{itemsPerPage: 5, insertAbove: 1, insertBelow: 0, maximumNumberOfLinks: 10}"> use {paginatedBlogs} as you used {blogs} before, most certainly inside a <f:for> loop. </f:widget.paginate>
One nive thing about the viewHelper was, that it supports pagination up till the database level:
In the above examples, it looks like {blogs} contains all Blog objects, thus you might wonder if all objects were fetched from the database. However, the blogs are NOT fetched from the database until you actually use them, so the paginate ViewHelper will adjust the query sent to the database and receive only the small subset of objects. So, there is no negative performance overhead in using the Paginate Widget.
Built With
- PHP
- TYPO3
Getting Started
Prerequisites
You need a project with a supported TYPO3 Version. Currently this is only TYPO3 Version 11.
Installation
composer require kaystrobach/typo3-polyfill-paginateviewhelper
Usage
<f:widget.paginate objects="{blogs}" as="paginatedBlogs"> use {paginatedBlogs} as you used {blogs} before, most certainly inside a <f:for> loop. </f:widget.paginate>
Roadmap
Don't use this polyfill to jumpstart new projects. If you are starting a new project follow the Coding guidelines of TYPO3 and use propert current techniques.
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Attention, we will only accept contributions to enhance stability, any changes which modify the behaviour (seen from the fluid side) will be rejected.
License
Distributed under the GPL-2.0-or-later License, as this is a derived work from the TYPO3 core. See LICENSE.txt
for more information.
Contact
Kay Strobach - @kaystrobach
Project Link: https://github.com/kaystrobach/typo3-polyfill-paginateviewhelper
Acknowledgments
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!