Creating a new context is quite easy. Here we're going to create a sample context that displays a block on all the nodes that have working-structure within its path.

Go to Admin menu > Structure > Context > Add.

Once on the Context Management screen, you'll see a list of all of the different available contexts on the site.

To add a new context, click the Add button.

A new screen will appear.

First, let's fill out some administrative information:

Name field = Add a name for your context. Keep the characters lowercase. Separate words with dashes.

Tag field = Add a tag field, if desired. This will group and sort your context on the management screen.

Description field = Add text that describes why this context exists.

Now, let's add a condition.

Conditions field = Path

You'll want to make sure that you have the correct path. Remember, the path is everything after the base URL. In our OSU Drupal 7 distribution, the base URL ends after the edu. Our example path is fairly deep down in the URL structure, as shown below.

So, according to our example, we need everything both before and after the working-structure part of the URL path. To do this, we'll use an asterik (*) wildcard both before and after the working-structure path segment.

We'll add a couple of things in the Path field:

  • */working-structure (show layout on node that has a URL address that ends with working-structure path segment)
  • */working-structure/* (show layout on all nodes that have working-structure within its path)

Now we need to add a reaction.

Reactions field = Blocks

When the block map on the right appears:

Content region = Main page content block (from the System fieldset)

Primary sidebar region = Custom Drupal Structure block (from the Block fieldset)

Click the Save button.

The custom block will now show on all pages that have working-structure in their URL paths.