lochmueller / calendarize

📆 Best TYPO3 Calendar ever 📆
http://typo3.org/extensions/repository/view/calendarize
74 stars 84 forks source link

List Pagination: Setting 'maximumNumberOfLinks' not taken into account #791

Closed biedert closed 7 months ago

biedert commented 7 months ago

The plugin setting plugin.tx_calendarize.settings.paginateConfiguration.maximumNumberOfLinks is currently not taken into account, since the used SimplePagination doesn't support the maximumNumberOfLinks parameter. This is a feature of SlidingWindowPagination, so maybe it would be better to switch to this Pagination?

Just change line Classes/Controller/CalendarController.php:778 to

$pagination = new SlidingWindowPagination($paginator, $maximumNumberOfLinks);

Maybe the template also needs some rework.

Tested in v13.0.2 in TYPO3 12.4

lochmueller commented 7 months ago

Hey @biedert ,

good point. The configuration is based on this suggestion: https://github.com/lochmueller/calendarize/blob/master/composer.json#L52

But you are right. I don't know the new SlidingWindowPagination that is shipped with TYPO3 v12. So we could/should...

Do you want to contribute and send a pull request?

Regards, Tim

biedert commented 7 months ago

Since you already pointed out the exact lines, that wasn't too hard ;)

But I don't think it is neither necessary to add the SlidingWindowPagination in the Backend Module nor to send the event for the Pagination, since the pagination has a core-like behavior. But feel free to disagree ;)

I also checked the Frontend Template, but it looks fine the way it is.

See #793 793

Cheers, Patrick

lochmueller commented 7 months ago

Hey @biedert thanks for the PR. Merged! Will be part of the next release... Regards, Tim