You are here

README.txt in Context 6.2

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.3 README.txt
  3. 6 README.txt
  4. 7.3 README.txt
Context for Drupal 6.x

Installation
------------
Context can be installed like any other Drupal module -- place it in
the modules directory for your site and enable it (and its requirement,
context) on the admin/build/modules page.

You will probably want to install context_contrib and context_ui as well.
context_contrib provides basic context integration for several contrib
modules including Views and context_ui provides a way for you to edit
contexts through the Drupal admin interface.

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. Under the 'set context' dialogue, 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 under the 'respond
   to context' items.
5. Add the contact block to a region under the block visibility
   settings.
6. Save the context.

Hooks
-----
hook_context_conditions()
  Provides an array of FormAPI definitions. Allows you to provide
  additional conditions for setting a context.

  Example: context_context_conditions()

hook_context_reactions()
  Provides an array of FormAPI definitions. Allows you to provide
  additional reactions that respond to a set context.

  Example: context_context_reactions()

hook_context_default_contexts()
  Provides an array of exported context definitions. Allows you
  to provide default contexts in your modules.

hook_context_default_contexts_alter()
  A drupal_alter() that acts on the collected array of default
  contexts before they are cached.

hook_context_active_contexts_alter()
  A drupal_alter() that acts on the collected array of active
  contexts on a given page load.

hook_context_links_alter()
  A drupal_alter() that acts on the contextual links provided
  to page.tpl.php.

Maintainers
-----------
yhahn (Young Hahn)
jmiccolis (Jeff Miccolis)
Steven Jones

Contributors
------------
dmitrig01 (Dmitri Gaskin)
Pasqualle (Csuthy Bálint)

File

README.txt
View source
  1. Context for Drupal 6.x
  2. Installation
  3. ------------
  4. Context can be installed like any other Drupal module -- place it in
  5. the modules directory for your site and enable it (and its requirement,
  6. context) on the admin/build/modules page.
  7. You will probably want to install context_contrib and context_ui as well.
  8. context_contrib provides basic context integration for several contrib
  9. modules including Views and context_ui provides a way for you to edit
  10. contexts through the Drupal admin interface.
  11. Basic usage
  12. -----------
  13. Context allows you to manage contextual conditions and reactions for
  14. different portions of your site. You can think of each context as
  15. representing a 'section' of your site. For each context, you can choose
  16. the conditions that trigger this context to be active and choose different
  17. aspects of Drupal that should respond to this active context.
  18. Think of conditions as a set of rules that are checked during page load
  19. to see what context is active. Any reactions that are associated with
  20. active contexts are then fired.
  21. Example
  22. -------
  23. You want to create a 'pressroom' section of your site. You have a press
  24. room view that displays press release nodes, but you also want to tie
  25. a book with media resources tightly to this section. You would also
  26. like a contact block you've made to appear whenever a user is in the
  27. pressroom section.
  28. 1. Add a new context on admin/build/context
  29. 2. Set the value to 'pressroom'
  30. 3. Under the 'set context' dialogue, associate the pressroom nodetype,
  31. the pressroom view, and the media kit book with the context.
  32. 4. Choose the pressroom menu item to be set active under the 'respond
  33. to context' items.
  34. 5. Add the contact block to a region under the block visibility
  35. settings.
  36. 6. Save the context.
  37. Hooks
  38. -----
  39. hook_context_conditions()
  40. Provides an array of FormAPI definitions. Allows you to provide
  41. additional conditions for setting a context.
  42. Example: context_context_conditions()
  43. hook_context_reactions()
  44. Provides an array of FormAPI definitions. Allows you to provide
  45. additional reactions that respond to a set context.
  46. Example: context_context_reactions()
  47. hook_context_default_contexts()
  48. Provides an array of exported context definitions. Allows you
  49. to provide default contexts in your modules.
  50. hook_context_default_contexts_alter()
  51. A drupal_alter() that acts on the collected array of default
  52. contexts before they are cached.
  53. hook_context_active_contexts_alter()
  54. A drupal_alter() that acts on the collected array of active
  55. contexts on a given page load.
  56. hook_context_links_alter()
  57. A drupal_alter() that acts on the contextual links provided
  58. to page.tpl.php.
  59. Maintainers
  60. -----------
  61. yhahn (Young Hahn)
  62. jmiccolis (Jeff Miccolis)
  63. Steven Jones
  64. Contributors
  65. ------------
  66. dmitrig01 (Dmitri Gaskin)
  67. Pasqualle (Csuthy Bálint)