web_fsearch_selections_count Shortcode

The web_fsearch_selections_count shortcode renders the number of active facets. Several choices in one facet count once; this is not a count of individual choices or matching results.

Usage

[web_fsearch_selections_count]

Attributes

Attribute Default Accepted values Purpose
class — String unless stated otherwise Adds one or more custom CSS classes to the rendered control.
context Current page context Enabled search context ID Associates the counter with the matching results context.
label Translated Active filters Plain text Accessible description; only the number is visible.

Faceted search context

Enable and configure Faceted Search in Settings → POM Theme → Content model → Faceted search. Controls, results, and gateways that belong together must use compatible context values.

The component updates as selections change. Ranges and exclusions also count once per active facet. Place it beside a clear-filters action or filter-panel trigger when that count helps visitors understand that constraints are active.

Updates preserve each instance's classes, context and accessible description. The compact status span uses count-is-zero or has-active-filters. Faceted Search must be enabled; missing or disabled explicit contexts render nothing. One interactive context per page is supported, and other explicit contexts are isolated. Page Builder administration can remain disabled.

The Faceted Search Selections Count block uses this same renderer and conditional assets.

Verify the initial state, one selection, several selections in one facet, selections across multiple facets, reset, URL-restored state, and browser back/forward navigation. If the count does not change, confirm that the page contains one compatible faceted-search context and that its frontend assets are not being deferred or removed incorrectly.

Verification

Test web_fsearch_selections_count with the configured Faceted Search context, active selections, no selections and an empty result set. Pay particular attention to class.