From adb0d31db17f479a45e61c816b2fd2c06bde2cc9 Mon Sep 17 00:00:00 2001 From: DaRealFreak Date: Fri, 15 Jul 2022 08:35:50 +0200 Subject: [PATCH] [DOC] add example fluid usage for both paginators --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 35a4a64..a5e2c26 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,22 @@ $paginator = new BucketPaginator( $pagination = new NumberedPagination($paginator, $maximumLinks); ``` +You can retrieve the bucket contents and additional items freely during the template as well: +```html + + You filtered for {pagination.paginator.additionalContent.filter.title} +
+ (Bucket ID: {pagination.paginator.bucketId}) +
+
+
+ + + {item.title} +
+
+``` + ### FromDataSourcePaginator Another option (f.e. due to storage reasons or to refresh results) would be to use the `FromDataSourcePaginator` to generate the items we are paginating over from the bucket contents. @@ -80,5 +96,21 @@ $paginator = new FromDataSourcePaginator( $pagination = new NumberedPagination($paginator, $maximumLinks); ``` +Here you can also retrieve the bucket content as well: +```html + + You filtered for {pagination.paginator.bucketContent.filter.title} +
+ (Bucket ID: {pagination.paginator.bucketId}) +
+
+
+ + + {item.title} +
+
+``` + ## License This project is licensed under the GPL v3.0 - see the [LICENSE](LICENSE) file for details