fluid
fluid copied to clipboard
Implement paginate tag
#247
I implemented paginate tag and added PaginateStatement to realize this function.
Some unit tests have been added, but they may not be comprehensive enough.
The user should create a derived class for PaginateableValue and implement its abstract methods.
I wanted to make the PaginateableValue.Paginate method asynchronous, but I didn't find a good solution (I need to introduce a third-party component: Nito.AsyncEx.Context).
Maybe we can add an interface and implement a converter from this interface to PaginateableValue.
I couldn't find the code where the for tag is used and shows how the current value is replaced by the page, like in this example https://github.com/Shopify/liquid/blob/eab13a07d9861a38d993d2749ae25f06ff76426b/performance/tests/vogue/blog.liquid
I couldn't find the code where the
fortag is used and shows how the current value is replaced by the page, like in this example https://github.com/Shopify/liquid/blob/eab13a07d9861a38d993d2749ae25f06ff76426b/performance/tests/vogue/blog.liquid
We don't need to replace it because PaginateableValue is an array by default and can be used for the for tag.