Facet API provides some nice generic API functions and methods that provide useful context about the search being executed. Therefore it seems that it would fit very well with the Context module. Some of the contextual information that can be provides are things like which search page a user is on, whether a search was executed, which facets are active, etc. Adding to the "Contrib" list since this should be created as a separate module that integrates the two projects.

Related issue posted against Context at #595210: Add a condition for searches being executed.

Comments

attiks’s picture

I'm looking for context integration as well, but as a reaction. I want to be able to change the facets depending on some condition (in my case the screen size of the browser), so I can limit the number of items displayed.

cpliakas’s picture

Cool use case. The facetapi_set_facet_enabled() and facetapi_get_facet_disabled() functions will come in handy here.

ygerasimov’s picture

StatusFileSize
new4.36 KB

I have created a sandbox project http://drupal.org/node/1591872 that already has Facet values condition. Welcome to test and give feedback.

ygerasimov’s picture

Status: Active » Needs review

Oops. Please disregard attached patch. :)

attiks’s picture

ygerasimov’s picture

Thanks. Corrected.

cpliakas’s picture

Status: Needs review » Fixed

This is looking awesome. Lot's of possibilities. Marking as fixed since a contrib module is providing this.

Status: Fixed » Closed (fixed)

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