Click on an image to make it bigger.
Context Module - Edit Existing Context - Front Page Layout

1. Front Page Context Example

We'll start by experimenting with a context that you're probably already familiar with...the front page.

There is a default Front Page context that is supplied in OSU Drupal 7.

Context Module - Edit Existing Context - Context List

2. Context List Navigation

To start, we're going to take the long way into the context's settings, via Admin menu > Structure > Context, so you can experience the Context List.

This is a list of all of the contexts that are available on the site. While we have quite a few default contexts that are available in OSU Drupal 7, you may see more (perhaps many more).

Context Module - Edit Existing Context - Click Edit Link for Context

3. Locate Front Page Context

We're interested in working with the Front Page context, so scroll down the list and find it.

Once you find it, click it's respective Edit link.

Context Module - Edit Existing Context - Context User Interface

4. Context User Interface

The screen that appears is called the Context User Interface, or Context UI. It might be a little confusing, initially, because there doesn't seem to be much there.

Context Module - Edit Existing Context - Open Conditions

5. Set a Condition

The Conditions section contains a drop-down menu that has several different conditions the system can recognize. We already have the Path condition selected (we could select multiple conditions if we wanted to, but right now we don't want to).

Click on the Path tab.

When you do this, you'll see a Path text box appear to the right. Multiple paths can be entered here, if desired. You can also use wildcards such as and asterik (*) to include a range of paths and a tilde (~) to exclude paths.

Right now we're just going to have this layout show on the front page. To do this, we use the <front> variable.

What this says to the system is "When we're on the front page, something is going to happen".

Context Module - Edit Existing Context - Open Reactions

6. Set a Reaction

The thing that happens is called a Reaction. Clicking on the Reactions drop-down list will show a list of available reactions within the system. Most often, you're going to have it show various blocks, which is how our example is set up.

Click on the Blocks tab to open up a map of the available regions and a list of fieldsets that contain different blocks.

Context Module - Edit Existing Context - Select Block

7. Add a Block

We're going to add a Recent Content block, which can be found in the System fieldset.

Click the Add link of the region you want to add the block to. In our example, we're going to put the block into the Primary Sidebar region.

Context Module - Edit Existing Context - Block Added to Region

8. Reorder Block

Drag the handle of the block to reorder it, if desired.

Click the Save button when you're finished reordering.

Context Module - Edit Existing Context - Updated Front Page

9. Updated Front Page

Now, take a look at the front page.

The blocks in the sidebar are currently only showing on the front page.

We could have them show on different pages if we wanted, though. We could also show them on different pages with different groups of blocks.

The Context module is really that flexible.