collective.collectionfilter
Faceted navigation filter for collection or contentlisting tiles.
Filter listing results for any catalog-indexed field — subjects, authors, portal types, and more.
The available filter types can be extended (see collective.collectionfilter.vocabularies).
There are five portlets/tiles available:
- Collection Filter — filter by values (select, radio, checkbox, link)
- Collection Search — fulltext search (SearchableText) on collection results
- Collection Maps — a LeafletJS map that shows and filters
IGeolocatableitems (requirescollective.geolocationbehavior, see below) - Collection Result Listing Sort — let users sort the filtered results
- Collection Filter Reset — reset all active filters
Filtering collections
Add filter/search portlets directly to a collection. Selecting filter values reloads results asynchronously (no page refresh) via AJAX.
If your theme or view template needs customization for AJAX loading, adjust the Content Selector and/or View Template settings.
Make sure the selector exists on both the source collection template and the target page.
Filters can also target a remote collection — specify a target collection in the portlet/tile settings.
Without AJAX, selecting a filter option redirects to the collection.
Mosaic integration
Install the extra:
pip install collective.collectionfilter[mosaic]
Add filter tiles via the Mosaic Insert menu and assign a collection.
Use a Content Listing tile to display results.
Multiple content listings and filters can coexist on the same page — use unique CSS classes in the listing tile settings and reference them in the filter tile's Content Selector.
Geolocation support
Install the extra:
pip install collective.collectionfilter[geolocation]
This provides a LeafletJS map tile/portlet showing IGeolocatable collection items.
Enable Narrow down results to filter the collection and other tiles when the user pans or zooms the map.
Customizing GroupByCriteria
GroupByCriteria is a global utility that defines which catalog indexes are available as filter criteria.
Each index entry has this structure:
{
'index': 'Subject', # catalog index name
'metadata': 'Subject', # metadata column name
'display_modifier': _, # callable(value, index) -> display string
'index_modifier': None, # callable to transform search values
'value_blacklist': [], # values to exclude (list or callable)
'sort_key_function': lambda it: it['title'].lower(),
}
To customize, register an IGroupByModifier adapter:
from collective.collectionfilter.interfaces import IGroupByCriteria
from collective.collectionfilter.interfaces import IGroupByModifier
from zope.component import adapter
from zope.interface import implementer
@implementer(IGroupByModifier)
@adapter(IGroupByCriteria)
def groupby_modifier(groupby):
groupby._groupby['Subject']['display_modifier'] = lambda x, idx: x.upper()
groupby._groupby['my_custom_index'] = {
'index': 'my_custom_index',
'metadata': 'my_custom_metadata',
'display_modifier': lambda val, idx: f'Custom: {val}',
}
<configure xmlns="http://namespaces.zope.org/zope">
<adapter factory=".mymodule.groupby_modifier" name="my_modifier" />
</configure>
The adapter is called by GroupByCriteria.groupby.
Modify the _groupby dict (not the groupby property, which triggers adapter lookup).
Compatibility
- Version 6.x — Plone 6.2+
- Version 5.x — Plone 6.0+
- Version 4.x — Plone 5.2
- Version 3.x — Plone 5.0/5.1
If AJAX loading doesn't work with your theme, disable it in the registry or override via diazo.
Authors
- Johannes Raggam
- Peter Holzer
Based on collective.portlet.collectionfilter and collective.portlet.collectionbysubject.
Metadata
Release files for collective.collectionfilter 6.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective_collectionfilter-6.0.0.tar.gz | 1.1 MB | Without provenance | Details for collective_collectionfilter-6.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| collective_collectionfilter-6.0.0-py3-none-any.whl | Python 3 | none | any | Details for collective_collectionfilter-6.0.0-py3-none-any.whl |
Total release size: 3.2 MB
Release files / collective_collectionfilter-6.0.0.tar.gz
| Download URL | collective_collectionfilter-6.0.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1f2a9bf9001e3151f1bd3a054f0e2966cb76975c22853698616f168122fba8d
|
|
BLAKE2b-256 checksum How to use checksums |
f62d8f45fad5775e48376060c68634ecb266dd9956bc55e13ef57fc231b8b023
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / collective_collectionfilter-6.0.0-py3-none-any.whl
| Download URL | collective_collectionfilter-6.0.0-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
865bf9b19b9d6cf72118245737337bf481f5de7cd196a0034c3cf4e2e9db9358
|
|
BLAKE2b-256 checksum How to use checksums |
3a55b1561923975c61ff9c858988fc8c7906b8e7509e3b5f63b8e7c5a307de7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for collective.collectionfilter 6.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.