diff --git a/context/g2-admin.context.inc b/context/g2-admin.context.inc
new file mode 100644
index 0000000..37d54f4
--- /dev/null
+++ b/context/g2-admin.context.inc
@@ -0,0 +1,25 @@
+<?php
+$context = new stdClass;
+$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
+$context->api_version = 3;
+$context->name = 'g2-admin';
+$context->description = 'G2 privileged context';
+$context->tag = 'g2';
+$context->conditions = array(
+  'g2' => array(
+    'values' => array(
+      'g2_admin' => 'g2_admin',
+    ),
+  ),
+);
+$context->reactions = array(
+  'theme_html' => array(
+    'class' => 'context-g2-admin',
+  ),
+);
+$context->condition_mode = 0;
+
+// Translatables
+// Included for use with string extractors like potx.
+t('Context d\'admin g2');
+t('g2');
diff --git a/context/g2-user.context.inc b/context/g2-user.context.inc
new file mode 100644
index 0000000..893b017
--- /dev/null
+++ b/context/g2-user.context.inc
@@ -0,0 +1,31 @@
+<?php
+
+$context = new stdClass;
+$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
+$context->api_version = 3;
+$context->name = 'g2-unprivileged';
+$context->description = 'G2 unprivileged context';
+$context->tag = 'g2';
+$context->conditions = array(
+  'g2' => array(
+    'values' => array(
+      'g2_node' => 'g2_node',
+      'g2_user' => 'g2_user',
+    ),
+  ),
+);
+$context->reactions = array(
+  'g2_template' => array(
+    'g2-template' => 1,
+  ),
+  'theme_html' => array(
+    'class' => 'context-g2',
+  ),
+);
+$context->condition_mode = 0;
+
+
+// Translatables
+// Included for use with string extractors like potx.
+t('G2 unprivileged context');
+t('g2');
diff --git a/context/g2.context.inc b/context/g2.context.inc
new file mode 100644
index 0000000..9c3b19c
--- /dev/null
+++ b/context/g2.context.inc
@@ -0,0 +1,26 @@
+<?php
+/**
+ * @file
+ * Default contexts.
+ *
+ * This file should really be named g2.context_defaults.inc once this is fixed:
+ * http://drupal.org/node/1242632
+ */
+
+/**
+ * Implements hook_context_default_contexts().
+ *
+ * This is a ctools defaults hook.
+ */
+function g2_context_default_contexts() {
+  $path = drupal_get_path('module', 'g2') . '/context';
+  $contexts = file_scan_directory($path, '/^g2-.*\.context\.inc$/');
+  $ret = array();
+  foreach ($contexts as $k => $v) {
+    if (file_exists(DRUPAL_ROOT . '/' . $k)) {
+      require_once(DRUPAL_ROOT . '/' . $k);
+    $ret[$context->name] = $context;
+    }
+  }
+  return $ret;
+}
diff --git a/context/g2.plugins.inc b/context/g2.plugins.inc
new file mode 100644
index 0000000..1acd4f5
--- /dev/null
+++ b/context/g2.plugins.inc
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Context registry.
+ */
+function _g2_context_registry() {
+  $registry = array();
+  $registry['conditions'] = array(
+    'g2' => array(
+      'title' => t('G2 Glossary'),
+      'description' => t('Set this context on G2 pages and node pages when node type is %type.', array('%type' => G2\NODETYPE)),
+      'plugin' => 'context_condition_g2',
+    ),
+  );
+
+  $registry['reactions'] = array(
+    'g2_template' => array(
+      'title' => t('G2 Glossary'),
+      'description' => t('Enable the page-g2 template as a page template.'),
+      'plugin' => 'context_reaction_g2_template',
+    ),
+  );
+
+  // dsm($registry, __FUNCTION__);
+  return $registry;
+}
+
+/**
+ * Context plugins.
+ */
+function _g2_context_plugins() {
+  $plugins = array();
+  $path = drupal_get_path('module', 'g2') . '/plugins';
+
+  /**
+   * Conditions.
+   */
+  $plugins['context_condition_g2'] = array(
+    'handler' => array(
+      'file' => 'context_condition_g2.inc',
+      'class' => 'context_condition_g2',
+    ),
+  );
+
+  $plugins['context_reaction_g2_template'] = array(
+    'handler' => array(
+      'file' => 'context_reaction_g2_template.inc',
+      'class' => 'context_reaction_g2_template',
+    ),
+  );
+
+  foreach ($plugins as $name => &$plugin) {
+    $plugin['handler']['path'] = $path;
+  }
+
+  // dsm($plugins, __FUNCTION__);
+  return $plugins;
+}
diff --git a/g2.info b/g2.info
index 3215e25..11dc2b1 100644
--- a/g2.info
+++ b/g2.info
@@ -26,6 +26,8 @@ core = 7.x
 php = 5.3
 configure = admin/config/content/g2
 
+dependencies[] = context
+
 files[] = tests/access.test
 
 ; G2 is expected to be a major feature on sites where it is present, hence
diff --git a/g2.module b/g2.module
index 2260613..4bdea6c 100644
--- a/g2.module
+++ b/g2.module
@@ -34,6 +34,7 @@ namespace g2 {
    * Default value of the G2 alphabar
    */
   const DEFALPHABAR = '0123456789abcdefghijklmnopqrstuvwxyz';
+  //define('g2\DEFALPHABAR',          '0123456789abcdefghijklmnopqrstuvwxyz');
 
   /**
    * Default length of an alphabar row
@@ -465,6 +466,11 @@ namespace g2 {
    * @return array
    */
   function admin_settings($form, &$form_state) {
+    // Activate context
+    if ($plugin = context_get_plugin('condition', 'g2')) {
+      $plugin->execute('g2_admin');
+    }
+
     $form['main'] = array(
       '#type' => 'fieldset',
       '#title' => t('Main page'),
@@ -1065,6 +1071,11 @@ namespace g2 {
    * @return string
    */
   function page_entries($nodes) {
+    // Activate context
+    if ($plugin = context_get_plugin('condition', 'g2')) {
+      $plugin->execute('g2_user');
+    }
+
     $ret = theme('g2_entries', array('entries' => $nodes));
     return $ret;
   }
@@ -1088,6 +1099,11 @@ namespace g2 {
    * @return array Render array for page.
    */
   function page_main() {
+    // Activate context
+    if ($plugin = context_get_plugin('condition', 'g2')) {
+      $plugin->execute('g2_user');
+    }
+
     // rowlen == 2 << 16 so that only an extremely long alphabar would wrap
     $alphabar = theme('g2_alphabar', array(
       'alphabar' => alphabar(),
@@ -1197,6 +1213,11 @@ namespace g2 {
    * @return string HTML
    */
   function referer_links($form, $form_state, $node) {
+    // Activate context
+    if ($plugin = context_get_plugin('condition', 'g2')) {
+      $plugin->execute('g2_admin');
+    }
+
     // Build list of referers
     $nid = $node->nid;
 
@@ -1343,6 +1364,11 @@ namespace g2 {
    * @return array
    */
   function referer_wipe_confirm_form($form, &$form_state, $node = NULL) {
+    // Activate context
+    if ($plugin = context_get_plugin('condition', 'g2')) {
+      $plugin->execute('g2_admin');
+    }
+
     if (is_object($node) && isset($node->nid)) {
       $question = t('Erase referer information from %title ?', array(
         '%title' => $node->title,
@@ -1908,6 +1934,25 @@ namespace {
   }
 
   /**
+   * Implements hook_context_plugins().
+   *
+   * This is a ctools plugins hook.
+   */
+  function g2_context_plugins() {
+    module_load_include('inc', 'g2', 'context/g2.plugins');
+    return _g2_context_plugins();
+  }
+
+
+  /**
+   * Implements hook_context_registry().
+   */
+  function g2_context_registry() {
+    module_load_include('inc', 'g2', 'context/g2.plugins');
+    return _g2_context_registry();
+  }
+
+  /**
    * Implements hook_cron().
    *
    * In G2's case, change the WOTD once a day if this feature is enabled,
@@ -1927,6 +1972,25 @@ namespace {
   }
 
   /**
+   * Implements hook_ctools_plugin_api().
+   */
+  function g2_ctools_plugin_api($module, $api) {
+    if ($module == 'context' && $api == 'context') {
+      $ret = array(
+        'version' => 3,
+        'path' => drupal_get_path('module', 'g2') . '/context',
+        // Not until http://drupal.org/node/1242632 is fixed
+        // 'file' => 'g2.context_defaults.inc',
+      );
+    }
+    else {
+      $ret = NULL;
+    }
+
+    return $ret;
+  }
+
+  /**
    * Implements hook_delete().
    */
   function g2_delete($node) {
@@ -2201,7 +2265,7 @@ namespace {
     );
 
     $items[g2\PATHENTRIES . '/%g2_title'] = array(
-      'title' => t('G2 entries by name'),
+      'title' => 'G2 entries by name',
       'page callback' => 'g2\page_entries',
       'page arguments' => array(2),
       'access arguments' => array(g2\PERMVIEW),
@@ -2350,6 +2414,17 @@ namespace {
   }
 
   /**
+   * Implements hook_preprocess_page().
+   *
+   * - introduce G2 page template suggestion when page is in a G2 context
+   */
+  function g2_preprocess_page(&$vars) {
+    if ($plugin = context_get_plugin('reaction', 'g2_template')) {
+      $plugin->execute($vars);
+    }
+  }
+
+  /**
    * Implements hook_theme().
    */
   function g2_theme($existing, $type, $theme, $path) {
@@ -2493,6 +2568,11 @@ namespace {
       if (variable_get(g2\VARLOGREFERRERS, g2\DEFLOGREFERRERS)) {
         g2\log_referrers($node);
       }
+
+      // Activate context
+      if ($plugin = context_get_plugin('condition', 'g2')) {
+        $plugin->execute('g2_node');
+      }
     }
 
   //  // Build more link, apply input format, including sanitizing.
@@ -2737,6 +2817,11 @@ EOT;
    * @return string HTML
    */
   function theme_g2_initial($variables) {
+    // Activate context
+    if ($plugin = context_get_plugin('condition', 'g2')) {
+      $plugin->execute('g2_user');
+    }
+
     $initial = $variables['initial'];
     $initial = filter_xss($initial);
     // We are not using t(), because this is NOT translatable content.
diff --git a/plugins/context_condition_g2.inc b/plugins/context_condition_g2.inc
new file mode 100644
index 0000000..9803ffc
--- /dev/null
+++ b/plugins/context_condition_g2.inc
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Expose G2-related pages as a context condition.
+ */
+class context_condition_g2 extends context_condition {
+  function condition_values() {
+    $values = array();
+    $values['g2_admin'] = t('G2 admin pages: settings');
+    $values['g2_node'] = t('G2 node pages');
+    $values['g2_user'] = t('G2 user pages: main, per-initial, entries list');
+    return $values;
+  }
+
+  function execute($value) {
+    foreach ($this->get_contexts($value) as $key => $context) {
+      $this->condition_met($context, $value);
+    }
+  }
+}
diff --git a/plugins/context_reaction_g2_template.inc b/plugins/context_reaction_g2_template.inc
new file mode 100644
index 0000000..6ad25c7
--- /dev/null
+++ b/plugins/context_reaction_g2_template.inc
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Expose themes as context reactions.
+ */
+class context_reaction_g2_template extends context_reaction_theme {
+
+  function options_form($context) {
+    $form = array();
+    $form['info'] = array(
+      '#type' => 'markup',
+      '#markup' => t('Enable the page-g2 page template'),
+    );
+
+    $form['g2-template'] = array(
+      '#type' => 'value',
+      '#value' => TRUE,
+    );
+    return $form;
+  }
+
+  function options_form_submit($values) {
+    return array('g2-template' => 1);
+  }
+
+  /**
+   * Enable additional template.
+   */
+  function execute(&$vars) {
+    foreach ($this->get_contexts() as $name => $context) {
+      if (!empty($context->reactions['g2_template']['g2-template']) && !in_array('page-g2', $vars['theme_hook_suggestions'])) {
+        $vars['theme_hook_suggestions'][] = 'page__g2';
+      }
+    }
+  }
+}
