You are here
Context
Context 3.x for Drupal 6.x
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.php
file for a variety of special case pages like the site frontpage, login page, admin section, etc.
Dependencies
Required
- Chaos Tools 1.7 or higher
Recommended
- 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.
-
Run
update.php
ordrush updatedb
. -
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.txt
for instructions on adding and extending plugins in Context.
Documentation
- README.txt
- API.txt
- 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).
Screencasts
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...
Thanks
- Contributors: dmitrig01 (Dmitri Gaskin), Pasqualle (Bálint Csuthy), alex_b (Alex Barth)
- Maintainers: yhahn (Young Hahn), jmiccolis (Jeff Miccolis), Steven Jones
- Sponsored by Development Seed