I have a list of events and what I need is show the first 5 events of a certain category on page 1 and then show all events (including the first 5 of category X) on the next pages.
So what I tried to do is create 2 extbase Queries for my results and tried to merge those 2. But with toArray or ObjectStorage I get something like the following error in my pagination template:
Argument 1 passed to TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper::render() must implement interface TYPO3\CMS\Extbase\Persistence\QueryResultInterface, instance of TYPO3\CMS\Extbase\Persistence\ObjectStorage given
so how can I merge 2 QueryResults without converting them to something else? Or is there another way to achieve what I need to achieve?
A little example of how I need this:
page 1 (the first 5 Events in Category X):
Event 4, Category X
Event 5, Category X
Event 8, Category X
Event 9, Category X
Event 10, Category X
page 2 (from now on everything is sorted by ID):
Event 1, Category A
Event 2, Category B
Event 3, Category B
Event 4, Category X
Evnet 5, Category X
page 3:
Event 6, Category A
Event 7, Category B
Event 8, Category X
Event 9, Category X
Event 10, Category X
using f:widget.paginate in my template.