README.txt 2.51 KB
Newer Older
1

young hahn's avatar
young hahn committed
2 3 4 5 6 7 8 9 10 11 12 13 14
Current state of Context for Drupal 7
-------------------------------------
Context for D7 is a straight port of Context 3.x from D6. There are no major
API changes and any exported contexts from D6 should be compatible with the D7
version. You will need the latest CTools (as of Sept. 16 2010) from here:

- http://github.com/sdboyer/ctools

### Working

- all conditions except node taxonomy condition
- all reactions
- context UI
young hahn's avatar
young hahn committed
15
- context layouts
16
- inline editor (see the context_ui README file for info on enabling)
young hahn's avatar
young hahn committed
17 18 19 20 21 22 23

### Expect API changes

- node taxonomy condition to generic field condition for entities


Context 3.x for Drupal 7.x
young hahn's avatar
young hahn committed
24 25 26 27 28 29 30 31 32 33
--------------------------
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.
34

young hahn's avatar
young hahn committed
35

36 37 38 39
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,
40
CTools) on the `admin/modules` page.
41

42 43 44
You will probably also want to install Context UI which provides a way for
you to edit contexts through the Drupal admin interface.

young hahn's avatar
young hahn committed
45

46 47 48 49 50 51 52 53
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.

54
1. Add a new context on admin/structure/context
55 56 57 58 59
2. Under "Conditions", associate the pressroom nodetype, the pressroom view,
   and the media kit book with the context.
3. Under "Reactions > Menu", choose the pressroom menu item to be set active.
4. Under "Reactions > Blocks", add the contact block to a region.
5. Save the context.
60

young hahn's avatar
young hahn committed
61 62 63 64
For a more in-depth overview of the UI components, see the Context UI
`README.txt`.


65 66
Hooks
-----
young hahn's avatar
young hahn committed
67 68
See `context.api.php` for the hooks made available by context and `API.txt` for
usage examples.
69

young hahn's avatar
young hahn committed
70

71 72
Maintainers
-----------
young hahn's avatar
young hahn committed
73 74 75

- yhahn (Young Hahn)
- jmiccolis (Jeff Miccolis)
young hahn's avatar
young hahn committed
76
- Steven Jones
young hahn's avatar
young hahn committed
77

78 79 80

Contributors
------------
young hahn's avatar
young hahn committed
81 82 83 84

- alex_b (Alex Barth)
- dmitrig01 (Dmitri Gaskin)
- Pasqualle (Csuthy Bálint)