spooner-web / paginated-processor
Pagination as TYPO3 DataProcessor
1.0.0
2021-11-03 16:16 UTC
Requires
- typo3/cms-core: ^11.5
- typo3/cms-fluid: ^11.5
README
What does it do?
Basically, it's a DatabaseQueryProcessor of TYPO3 with added pagination.
Installation
composer require spooner-web/paginated-processor
Usage
- Include static templates named "TYPO3 PaginatedDatabaseQueryProcessor"
- Use the DataProcessor in TypoScript with pagination settings (see Configuration section)
- Enrich your Listing Fluid template
Configuration in TypoScript
dataProcessing {
10 = SpoonerWeb\PaginatedProcessor\DataProcessing\PaginatedDatabaseQueryProcessor
10 {
# Basic settings you use in DatabaseQueryProcessor
# Additionally you need this section:
paginate {
activate = 1
itemsPerPage = 5
insertAbove = 1
insertBelow = 0
parameterIndex = tx_myrecords
}
}
}
Add partials in your listing template
<f:render partial="Pagination" arguments="{pagination: pagination, parameter: 'tx_myrecords', above: 1}" />
<ol>
<f:for each="{records}" as="item">
...
</f:for>
</ol>
<f:render partial="Pagination" arguments="{pagination: pagination, parameter: 'tx_myrecords', below: 1}" />
What to care about?
- The partial is included for Fluid Styled Content elements with the integration of static template
- You need to add the path to the partial when you want to use it in your own extension