4 Context layouts provides a formalized way for themes to declare and switch
5 between page templates using Context. It is a continuation of an old Drupal
6 themer's trick to switch to something besides the standard `page.tpl.php` file
7 for a variety of special-case pages like the site frontpage, login page, admin
13 In order to use context layouts, your site must meet a few conditions:
15 - Context and Context layouts modules are enabled (`admin/build/modules`).
16 - You are using a theme which provides and has declared multiple layouts. (See
17 "Example themes" for themes you can try.)
22 Once you have layouts enabled, you can have a context trigger the usage of a
23 particular layout in either the admin interface (`admin/build/context`) or
24 inline context editor. Different layouts may have fewer or greater regions than
25 the default page template, so adjust your blocks accordingly.
28 Supporting context layouts in your theme
29 ----------------------------------------
30 You can add layouts support to your theme by declaring additional layouts in
31 your theme's info file. Here is an example:
36 description = "Example theme"
38 engine = "phptemplate"
40 regions[left] = "Left sidebar"
41 regions[right] = "Right sidebar"
42 regions[content] = "Content"
43 regions[footer] = "Footer"
46 layouts[default][name] = "Default"
47 layouts[default][description] = "Simple two column page."
48 layouts[default][template] = "page"
49 layouts[default][regions][] = "content"
50 layouts[default][regions][] = "right"
53 layouts[columns][name] = "3 columns"
54 layouts[columns][description] = "Three column page."
55 layouts[columns][stylesheet] = "layout-columns.css"
56 layouts[columns][template] = "layout-columns"
57 layouts[columns][regions][] = "left"
58 layouts[columns][regions][] = "content"
59 layouts[columns][regions][] = "right"
60 layouts[columns][regions][] = "footer"
62 Each layout is declared under `layouts` with the key as the identifier that will
63 be used by context for this layout. You may use any reasonable machine name for
64 each layout, but note that `default` is special -- it will be the default layout
65 for your theme if no other layout is specified.
67 The following keys can be declared for each layout:
69 - `name`: The human readable name for this layout, shown in the admin UI.
70 - `description`: A short description of your layout, same as above.
71 - `stylesheet`: A stylesheet to be included with the layout. Optional.
72 - `template`: The name of the template file for this layout, without the
74 - `region`: An array of regions supported by this layout. Note that any of the
75 regions listed here **must also be declared** in the standard theme `regions`
81 - Cube, a subtheme included with [Rubik][1] provides a variety of layouts.
82 - [Ginkgo][2] the default theme included with Open Atrium.
84 [1]: http://github.com/developmentseed/rubik/downloads
85 [2]: http://github.com/developmentseed/ginkgo/downloads