Basic usage

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 respond 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.

Example

You want to create a 'pressroom' section of your site. You have a press room view that displays press release nodes, but you also want to tie a book with media resources tightly to this section. You would also like a contact block you've made to appear whenever a user is in the pressroom section.

  1. Add a new context on admin/build/context.
  2. Set the value to 'pressroom'
  3. In the 'Conditions' section, associate the pressroom nodetype, the pressroom view, and the media kit book with the context.
  4. Choose the pressroom menu item to be set active in the 'Reactions' section.
  5. Add the contact block to a region under the block visibility settings, at the bottom of the 'Reactions' section.
  6. Save the context.