As per the request at #1153980: Blocks are not hidden when no items are available for a facet, it would be great to be able to configure the behavior of empty facets.

Comments

cpliakas’s picture

One idea for a setting is the feature request #1156606: Implement a configurable filter system that can alter the facet's render array prior to being passing to the widget.

Update... I posted before thinking this through. The feature request is for facets with a single item, so that facet wouldn't be empty and wouldn't apply.

cpliakas’s picture

This is dependent on #1158256: Allow the realms to provide additional facet settings to the facet configuration form, since it will most likely be a realm-specific setting.

cpliakas’s picture

Status: Active » Needs review
StatusFileSize
new14.09 KB

This ended up being a fairly big change. The attached patch adds the functionality.

cpliakas’s picture

StatusFileSize
new13.73 KB

Same functionality, cleaned up commented out code.

cpliakas’s picture

Status: Needs review » Fixed

I have been playing around with this for a little while and it seems to be a sane change. We can resolve any edge case bugs later. Committed at 90af74a.

Status: Fixed » Closed (fixed)

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