Enhances the liquid built-in where filter to work with Paginate objects.

When invoked on a Paginate object, it efficiently filters the collection in the database before paginating it.

The properties by which different objects can be filtered when used in paginations are explicitly documented on each type of object.

Filtering can "drill-down" through the properties of related objects. If for example you have a collection of Designs from which you want to select only designs that are associated to a template from category called Canvases, you could do it with designs | filter: 'template.category', 'Canvases'.

Filtering by custom fields is supported. To filter by a custom field, specify the filter as custom.<custom-field-name>, for example website.public_addresses | filter: 'custom.express_service', 'true'.

Examples:

{% assign usa = website.countries | filter: 'code', 'US' | first %}
{% assign confirmed_orders = user.orders | where: 'status', 'C' %}
[% assign square_design_products = collection.design_products | where: 'design.template.custom' %}