Skip to main content

Shows a definable filter portlet that allows to filter search results

Project description

collective.portlet.filtersearch

This package defines a portlet that shows additional filter of current search results. The filtering works in two modes.

  1. Results grouped by a simple index/value

  2. Additionally group by unique values of selected criteria

Installation

To install just add a collective.portlet.filtersearch to your buildout file:

[buildout]
...
eggs =
    collective.portlet.filtersearch
    ...

Package uses z3c.autoinclude so there is no need to add it into your zcml section.

Restart your zope instance and install it via Add/Remove product in Plone control panel.

Setting

In the portlet edit form you can define which filters should appear in the portlet:

Criteria title - The title of criteria displayed in the portlet
Main index - Name of index which is used to group it ( it has to be in metadata too )
Value - The value of the index that the brain has to match to group

And additional values:

Expand list with unique values - Check box to enable the sub filtering
Sub index - Name of index which is used for listing unique groups dynamically

You can add as many criteria as you like

Hint: To enable the portlet at the search template, just add it to your site root and remove the line <metal:block fill-slot=”column_two_slot” /> to enable portlets at all.

TODO

  • How to determine when display the portlet and when hide - fix the available property

  • Add some tests would be nice

Changelog

0.1 (unreleased)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.portlet.filtersearch-0.2.zip (23.4 kB view details)

Uploaded Source

File details

Details for the file collective.portlet.filtersearch-0.2.zip.

File metadata

File hashes

Hashes for collective.portlet.filtersearch-0.2.zip
Algorithm Hash digest
SHA256 7301905d646e0fd6f5b2b5d154fa660d2cd3be451b75c355086b681314d032e1
MD5 8d4e57a136b0ee1f0a9158d1f84bba3c
BLAKE2b-256 429f7aaf0da23ef20062dc28e9827bc51f1f0aa11c2c34a0d16a4719dad25eaf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page