Video Link: http://youtu.be/cIk5F14Fd2s

Context Build Steps

Summary

The end result of this tutorial, you will have a the ability to revision and preview page-level layout changes.

Modules Needed

Patches needed

Build Steps

  1. Download Modules.
    • drush dl ctools, xautoload, sps, iib, context, context_field
  2. Apply Patches
    • Drupal Core
      1. Change the directory to the drupal root
      2. Download Patches
        • wget http://drupal.org/files/1728568_add_alias_to_node_query.patch
        • wget http://drupal.org/files/1730874_0.patch
      3. Apply Patches
        • git apply -v 1730874_0.patch
        • git apply -v 1728568_add_alias_to_node_query.patch
    • Context Field
      1. Change to the Context Field directory
      2. Download Patches
        • wget http://drupal.org/files/context_revisions.patch
      3. Apply Patch
        • git apply -v context_revisions.patch
  3. Setup Default Context
    1. Go to admin/structure/context.
    2. Either update an existing or create a new context and note the name.
  4. Go to admin/structure/context/settings and enabled "Use Context Editor Dialog"
  5. Add the Field to a content type using the "Context per Revision" widget.
  6. Select the default context you created in step 3.

At this point you should have a content type setup that will create a new Context for each revision. The next part walks through using SPS to preview the revision with the context.

Without SPS, you would not have a way to edit the context for a non-published revision outside of the Context UI. SPS overrides the node revision page and loads the correct revision of the node which has the correct Context. Then the Context Inline Editor can be used.