Hello,
I'm extending the PerchFactory class in an app and ran into a few things. My classes don't specify an index table so ultimately I'm using get_filtered_listing(), not get_filtered_listing_from_index().
Some of the below may be intentional and designed that way. And of course there's always the possibility I've implemented something incorrectly. None of the below is preventing me from achieving what I need, so just reporting in case any of this behaviour is not intentional.
Layout includes
I sometimes use Layout includes inside templates:
This generally works. However, it doesn't when using the skip-template option. I resorted to using a template handler instead.
Paging automatically enabled (when using count)
When using the count option, paging seems to be automatically enabled regardless of the value of the paginate option.
This is fine if I I'm only fetching one set of data on the page. However, if I'm fetching 2 or more sets of data and I only need one of them to be paginated, while the other(s) still needs to be limited by the count option, both sets will be paginated.
I'll use demo_collection() below for demonstration:
Using the start option is the only way I've found to actually disable the pagination:
?page= always works
Before I tried the start option I attempted to assign a different query string parameter name using the pagination-var option. The custom name I assign works, but ?page= also works regardless.
The custom name is used as expected in the pagination URLs in the template, but if I visit ?page=12, I'd get the 12th page for both Elephants and Unicorns; not just Elephants. So I'd have to refrain from using ?page= altogether to avoid unintentionally paginating something else on the page.