content_block
18 sites
No security coverage
The Content Block module (content_block) empowers website editors to dynamically embed and display content as a block, offering a flexible and intuitive way to highlight specific entities with customizable options—without requiring complex configurations.
Essentially, the Content Block module functions as a basic, non-exportable View, allowing dynamic content retrieval and presentation without the need for custom Views configurations. It provides an easy way to embed content blocks while maintaining flexibility for editors.
Features
- Configure the following options:
- Entity Type: Select the type of entity to display (e.g., nodes, taxonomy terms).
- Bundle: Choose the specific bundle (e.g., content type).
- View Mode: Define how the content is rendered.
- Number of Items: Specify the number of items to display.
- Sorting: Set the sorting criteria for the displayed items.
- Columns: Render the results in 1, 2, or 3 columns.
- Embed blocks anywhere blocks are supported in Drupal.
- Block Layout
- Layout Builder
- Views
- ...
Installation
- Download and place the module in the modules/contrib/content_block directory of your Drupal installation, or download it with composer:
composer require drupal/content_block - Enable the module via the Extend page in the Drupal admin interface or using Drush:
drush en content_block
Dependencies
This module depends on the following core module:
- Layout Discovery: Ensures compatibility with Layout Builder and other layout-related features. It is used for rendering the content in different layouts.
Usage
- Navigate to the Block Layout page, or find the block in any other way from the interface.
- Select the Content Block from the list of available blocks.
- Configure the block settings to define the entity type, bundle, view mode, number of items, sorting, and columns.
- Save the block and place it in the desired region.
Requirements
- Drupal 10 or higher.
Roadmap
- #3515067 - Add multilingual support
- #3515061- Include offset configuration option
- #3515063 - Include published configuration option
Maintainers
This module is maintained by pgrandeg. Contributions and feedback are welcome!
License
This project is licensed under the GPL-2.0-or-later.