Hi,

I have a case where I want to show the facet only when one item of that facet is selected.
I select the item from a self constructed link.

Why?
Because this facet has thousands of items, and I only want to show it when one is selected, so you can unselect an item.

I see this is easily done when removing the line in dependency_facet.inc:
unset($enabled_facets[$this->facet['name']]);

Maybe it is some edge-case but I don't think it hurts to make this possible for everyone.

Cheers!
Tom

Comments

ptmkenny’s picture

Category: Feature request » Support request
Status: Active » Fixed

If you are using something like FacetAPI Pretty Paths, you can simply hide the facet block on all pages except the relevant facet's path.

This will not disable the facet in the same way that making it a dependency would, but according to your comment you don't need to secure the fact, you just don't want to display it because it has a lot of options.

Status: Fixed » Closed (fixed)

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