Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Context allows you to manage contextual conditions and reactions for different portions of your site. You can define rules that trigger specific actions, such as displaying certain blocks when a particular content type is viewed. It provides an administrative interface to create and manage these contexts and their associated conditions and reactions.

Context

Context allows you to manage contextual conditions and reactions for different portions of your site. You can think of each context as representing a "section" of your site. For each context, you can choose the conditions that trigger this context to be active and choose different aspects of Drupal that should react to this active context.

Think of conditions as a set of rules that are checked during page load to see what context is active. Any reactions that are associated with active contexts are then fired.

An example of a condition could be when viewing a certain node type and blocks should be placed as a reaction when viewing a page with this node type.

Included modules

  • Context UI provides an administrative interface for managing and editing Contexts. It is not necessary for the proper functioning of contexts once they are built and can be turned off on most production sites.

Drupal 8

The Drupal 8 version is a port of the Drupal 7 version.

Drupal 8 version of this module uses the built in condition plugins supplied by Drupal through the Plugin API. So any conditional plugins supplied by other modules can also be used with Context.

Reactions are also defined through the new Drupal 8 Plugin API. The context module defines a plugin type named ContextReaction that you can extend when creating your own plugins.

Modules which extend functionality of Context:

Drupal 7

The inline editor

Drupal 7 version of module includes inline editor which is activated via a "Configure Layout" contextual link on blocks that appear on the page. Note that the inline editor must be enabled in the main context settings for this link to appear.

Other included modules

  • Context layouts provides a formalized way for themes to declare and switch between page templates using Context. It is a continuation of an old Drupal themer's trick to switch to something besides the standard page.tpl.php file for a variety of special case pages like the site frontpage, login page, admin section, etc.

Dependencies

Thanks

  • Contributors: dmitrig01 (Dmitri Gaskin), Pasqualle (Bálint Csuthy), alex_b (Alex Barth), yhahn (Young Hahn), jmiccolis (Jeff Miccolis)
  • Maintainers: febbraro (Frank Febbraro), Steven Jones, tekante (Chris Johnson), boshtian (Bostjan Kovac)
  • Sponsored by Phase2 Technology & Development Seed

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

5 tracked projects depend on this one

Activity

Tracked releases
1
Tracked since
Mar 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
5.0.0-rc2 Pre-release 9–11 Mar 6, 2025