This project is not covered by Drupal’s security advisory policy.
Conditional Content Block Rendering in Layout Builder
This module provides a solution for conditional rendering of content blocks when they are placed in Layout Builder.
It allows you to set rules for each block, determining when they should
be rendered based on the specific conditions.
Features
The basic functionality of this module is to provide a user-friendly interface for defining conditions under which certain content blocks will be rendered when used on the layout builder.
It is a simple approach that uses conditions to compare tokens against values.
This can be used to create dynamic, context-sensitive layouts. For example, you might use this module to show a specific block only to logged-in users or to display a block for users who meet certain criteria.
Post-Installation
After installing the module, when you create a new content block or edit an
existing one, you'll find a new section for defining rendering conditions.
You can add as many conditions as you need for each block, and the block will
only be shown or hidden based on the conditions you define.
Additional Requirements
This module requires Drupal core. No additional modules, libraries, or APIs are
required.
Recommended Modules
While not required, the Token module can
be used in conjunction with this module to show available tokens and provide
additional flexibility in defining rendering conditions.
Similar projects
There is a push to bring visibility control of blocks within Layout Builder to Drupal Core, but until then, this is a working solution to archive the same goal.
Project information
- Project categories: Content display
66 sites report using this module
- Created by matias on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.

