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.
Other 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.
- 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.phpfile for a variety of special case pages like the site frontpage, login page, admin section, etc.
The inline editor for 7.x
The inline editor has been redone for 7.x and 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.
- Chaos Tools 1.7 or higher
Recommended for 6.x
- jQuery UI in order to use the Context inline editor
- Admin 2.x in order to use the Context inline editor
Upgrading from Context 2.x for Drupal 6.x
- Download latest Context 3.x and latest CTools release and place in modules directory. Make sure to remove the existing Context 2.x directory before unpacking Context 3.x. There are stale files in the 2.x branch that need to be removed.
- If your site contains contexts defined in code they will be overridden. Re-export them to code again. If you are using any custom conditions or reactions, you may need to upgrade or reconfigure them by hand. See
API.txtfor instructions on adding and extending plugins in Context.
Drupal 6 Documentation
- Context Layouts: README.txt
- Context UI: README.txt
- Doxygen documentation is available for the 3.x branch courtesy of Treehouse Agency
While we maintain core usage and API docs with the module itself, please feel encouraged to contribute tutorials, HOWTOs, screencasts, and other docs to the Drupal.org handbook and other resources on the web (e.g. you or your organization's blog).
Older posts and presentations
Many of these presentations were given using older versions of Context. While many of the same concepts still apply, do not be surprised if exact UI or API elements have changed.
- Szeged 2008: http://szeged2008.drupalcon.org/files/Context_spaces.pdf
- Szeged 2008: http://www.archive.org/details/spaces_and_context_modules
- Boston 2008: http://www.developmentseed.org/sites/default/files/context_session_mar08...
- Boston 2008: http://www.archive.org/details/DrupalconBoston2008-CreatingCustomWorkflo...
- Quick demo: http://www.developmentseed.org/blog/2008/apr/09/context-ui
- Example site: http://www.developmentseed.org/blog/2008/jun/13/wri-org-redesign-launche...
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 201,997 sites currently report using this module. View usage statistics.
- Downloads: 1,872,679
- Automated tests: Enabled
- Last modified: September 8, 2016
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.