Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

Facets Attachment Display extends Drupal's search capabilities by allowing Views attachment displays to be used as facet sources. While standard Drupal setups only allow facets to be associated with main Views displays (pages, blocks), this module enables you to add facets to search results displayed through Views attachments, creating more flexible and powerful search interfaces.

Features

  • Enables Views attachment displays as valid facet sources in the Search API ecosystem
  • Allows independent filtering of attachment display results using facets
  • Seamlessly integrates with existing Search API and Facets infrastructure
  • Supports complex search interfaces with multiple result sections
  • Maintains the same familiar facet configuration workflow
  • Works with any Search API backend (Solr, Database, Elasticsearch, etc.)

Post-Installation

After installing the module:

  1. Create or edit a View that uses a Search API index as its base
  2. Set up a main display (page, block) and add an attachment display to it
  3. Configure both displays to use the Search API query type
  4. Go to the Facets administration page (/admin/config/search/facets) and click "Add facet"
  5. In the "Facet source" dropdown, you'll now see your attachment display listed as "Views attachment: [view_name]__[display_id]"
  6. Select this facet source and configure your facet as needed
  7. Place the facet block in your desired region

No additional configuration is required at the module level - it works automatically once enabled.

Additional Requirements

  • Drupal core 11.x
  • Search API module
  • Facets module
  • Views module (included in Drupal core)

Similar projects

While several modules extend Facets functionality, Facets Attachment Display is unique in its focus on Views attachment displays. The core Facets module supports regular Views displays, but not attachments. This module fills that specific gap in the Search API ecosystem.

  • Issue Queue Issue queue
  • Additional Information

    Technical Implementation

    The module works by registering a new Search API display plugin type (views_attachment) and implementing hooks to detect when a Views attachment display is being rendered. It then registers the attachment as a Search API display if it's attached to a display that uses Search API.

    Troubleshooting

    If your attachment display is not appearing as a facet source:

    • Ensure both the parent display and the attachment display use the Search API query type
    • Verify that the attachment display is properly configured to be attached to a main display
    • Clear the Drupal cache to ensure all plugin definitions are refreshed

    Activity

    Total releases
    2
    First release
    Mar 2025
    Latest release
    1 year ago
    Release cadence
    0 days
    Stability
    0% stable

    Releases

    Version Type Release date
    11.0.0-alpha1 Pre-release Mar 10, 2025
    11.x-dev Dev Mar 10, 2025