The reset link appear only when some facet filters are selected. It could be also usefull to make it appear when search keys are submitted.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drikc’s picture

Status: Active » Needs review
FileSize
1.72 KB

The attached patch make the reset link appear also when search keys are submitted.

drikc’s picture

Fix compatiblity with php < 5.5.

PaulDinelle’s picture

I used this patch for a bit, but after customizing my search key and combining it with current_search_links module (to display reset buttons beside each facet), this module would no longer clear out keywords.

I've updated the patch to add in a custom settings field for the search keyword (mimicking the current_search_links module) so that the keywords could be properly removed. It meant I had to duplicate the CurrentSearchItem settings form, but I couldn't see a way around this.

Hope this helps someone else!

PaulDinelle’s picture

PaulDinelle’s picture

Hmm, my patch still doesn't work 100% with current_search_links module.

PaulDinelle’s picture

FileSize
5.11 KB

Okay, fixed an issue with the filter intersection list. If the first entry was empty (as is the case if removing the parent term in a hierarchy-enforced list), it was accidentally including the second filter in the reset link query.

mlanth’s picture

Patch re-roll to reflect newer module version.