Part of the Context ecosystem · 11 projects
Context lets you place blocks and apply other reactions when a set of conditions is met. A sitewide context is the easy way to put a header, a footer and sidebars on every page, until you reach the pages that should not have them.
Context Disable Contexts adds a "Disable Contexts" reaction for those pages. When a context with this reaction is active, it turns other active contexts off, so their blocks and other reactions are not added to the page. A login page, an error page or a landing page can drop what the sitewide contexts add, without an exception written into the conditions of each of them.
Features
- Disable only the contexts you select, or every context except the ones you select.
- The blocks of a disabled context are never built, so nothing is rendered and then thrown away.
- A context never disables itself. Its own checkbox is listed but locked.
- Works with any conditions, since the reaction runs whenever its own context is active.
- Covered by kernel and functional tests.
Post-installation
- Go to Administration » Structure » Context and edit a context.
- Click "Add reaction" and choose "Disable Contexts".
- Under "Disable", choose "Only the selected contexts" or "All contexts except for the selected".
- Check the contexts and save.
The module has no settings page and no permissions of its own.
One thing to know: the Theme reaction of a disabled context still applies, because Context picks the theme before this module runs.
Additional requirements
- Drupal 10.3 or later, Drupal 11, or Drupal 12
- Context 5.0.0-rc4 or later
Similar projects
Context Disable Context did this for Drupal 6 and 7 and has no release for later versions. This module is its successor, written new for Drupal 10 and later, and it adds the "all except the selected" mode.
Ask your assistant about Context Disable Contexts
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Context ecosystem
Most installed first