Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows you to control the visibility of Layout Builder sections and blocks using the Context module, enabling more dynamic content personalization, A/B testing, or access control scenarios. It lets you define conditions that determine when layouts or specific components are shown or hidden based on various user or session data.

Layout Builder Context adds the capability for layout sections and block components for Layout Builder to leverage the Context module to assign visibility to either an entire layout or individual components within them.

This makes it possible to hide all or parts of areas with Layout Builder with any Contexts you come up with. This is intended to drive visibility only. Contexts with Reactions won't have any effect within Layout Builder (at least, not with this module). You could theoretically implement your own Reaction plugins to affect layouts or the blocks within them (see the context.module file for ideas).

Context allows for grouping of several conditions for greater composition of rules than normal block visibility and makes them re-usable. This is useful when you need more dynamic control over what appears on a per user basis. Since condition plugins and context definitions can be created that can inspect user field values or session cookies, this can let you add layouts or block components to a single node that show in one case for some users, and hide them for others. This helps when implementing content personalization, A/B testing, access controlled data, or other advanced scenarios with Layout Builder.

For some ideas of what kinds of Contexts/conditions to create, see the Views Minimum module.

Activity

Total releases
1
First release
Jan 2026
Latest release
6 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.2 Stable Jan 15, 2026