Presently Hierarchical Select doesn't allow options on views exposed filters. The «none» option (actually «any») is essential in exposed filters because without it users are forced to select one category or they will end up with empty search results.

Although not so critical, unlocked operators support («Is one of», «Is none of», «Is all of») would turn this module 100% compatible with views exposed filters.

This issue was first discussed here.

CommentFileSizeAuthor
#4 initial.patch10.09 KBwim leers

Comments

wim leers’s picture

Assigned: Unassigned » wim leers

The first step would be: "any"/"all" support in the hierarchical select form element.

The second step is the operators part. This will require a customized version of the hierarchical_select form element, because it'd otherwise be bloat: it's only necessary for Views support. "any"/"all" support has use cases in any hierarchy, although it's pretty rare.
So I'm postponing this second part, because it'd be a lot of work to do if I don't want to make Hierarchical Select messy.
Note: it's possible that we may not even need this operators stuff, if I can manage to override *just* the selection of items instead of both the selection of items and that operator select. I don't have the time to look into this atm, so I'm assuming the worst-case scenario.

Assigning to myself since it's pretty unlikely somebody else will step up to do this. Status is critical indeed: HS claims Views integration, yet fails to deliver this critical feature.

Encarte’s picture

You're right: the second step is kind of a luxury. Very few sites will need it and the ones that do are probably big sites which can and should sponsor for such feature. Best regards.

wim leers’s picture

Users interested in this issue may also be interested in this one: http://drupal.org/node/217368.

wim leers’s picture

StatusFileSize
new10.09 KB

I began writing a new property for the hierarchical select settings in a form item: special values. This would allow you to easily add new special things like **ALL**.

However, this is a *very* special property, that demands exclusive selection: when it is selected, no other value should be selected. In multiple select mode, that becomes an issue: multiple select mode should not be allowed when special values are defined. The correct solution (and also the solution that doesn't require me to make the number of parameters even greater), is to implement the HS hooks again, for Taxonomy exposed filters in Views. Otherwise the code gets unnecessarily bloated.

For the sake of completeness, I've attached the patch of what I had so far.

wim leers’s picture

Title: Views exposed filters: the «none» option » Views exposed Taxonomy filters: the "any" option
wim leers’s picture

Priority: Critical » Minor
Status: Active » Postponed

To do this properly, I'll have to provide some configuration settings per view as well. This will require a relatively large amount of work, for which I don't have the time ATM. Postponing.

For now, I've implemented the second thing you were asking for, which is actually *a lot* easier than the first thing... See #217395 for details. Thanks to that, this issue just became minor :)

Encarte’s picture

I've tested the operator selection feature in rc3 and it seems to be working perfectly. Thank you for providing this great module to the community. Aren't there barnstars for Drupal developers?

wim leers’s picture

Geh :P Not AFAIK. But you could of course start a new tradition ;) :)

djorn’s picture

Reposted as http://drupal.org/node/218219 per Wim Leer's request (#10). Sorry!

wim leers’s picture

Please open a new issue for that.

wim leers’s picture

Title: Views exposed Taxonomy filters: the "any" option » Views exposed Taxonomy filters: supporting the **ALL** option
Version: 5.x-2.0-rc2 » 5.x-3.x-dev
Status: Postponed » Active

This feature will be sponsored by Marmaladesoul.

wim leers’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.