Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
- Add a new block display to a view.
- Set the block display's row type to content (as opposed to fields).
- Select a view mode to use by default.
- In the block display's block settings > Allow settings, enable Select view mode.
- Save the view.
- Place an instance of this views block somewhere.
- In the block's configuration options, select the view mode of your choice.
- Save the block.
Supporting organizations:
Funds development time.
Project information
- Module categories: Content Display, Developer Tools
- Ecosystem: Chaos Tool Suite (ctools)
- 25 sites report using this module
- Created by jpoesen on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.