This project is not covered by Drupal’s security advisory policy.
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.
Project information
- Project categories: Content display, Site structure
- Ecosystem: Context
- Created by loze on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
