Screenshot of the block display settings
Screenshot of the block instance configuration options

This project is not covered by Drupal’s security advisory policy.

About

This module lets you make a views block display's view mode configurable for each individual block via the block's configuration settings.

Dependency: ctools_views, which lets you expose additional views display configuration options as block configuration options.

Use case

  • A site's Articles content type has 4 custom view modes (small, medium, large, extra_large).
  • Editors use Layout Builder to place 'recent articles' blocks all over the site.
  • Editors should be able to select which view mode to use for any given block.

Installation

Install with composer as you would any contributed module.

This module itself has no configuration options; it only provides additional
configuration options to views block displays.

Usage

  1. Add a new block display to a view.
  2. Set the block display's row type to content (as opposed to fields).
  3. Select a view mode to use by default.
  4. In the block display's block settings > Allow settings, enable Select view mode.
  5. Save the view.
  6. Place an instance of this views block somewhere.
  7. In the block's configuration options, select the view mode of your choice.
  8. Save the block.
Supporting organizations: 
Funds development time.

Project information

Releases