Index: context.core.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/Attic/context.core.inc,v
retrieving revision 1.1.2.3.2.20.2.26
diff -u -p -r1.1.2.3.2.20.2.26 context.core.inc
--- context.core.inc	30 Jul 2010 18:15:36 -0000	1.1.2.3.2.20.2.26
+++ context.core.inc	30 Jul 2010 20:39:46 -0000
@@ -145,6 +145,11 @@ function context_node_condition(&$node, 
       $plugin->execute($node, $op);
     }
   }
+  if (module_exists('content')) {
+    if ($plugin = context_get_plugin('condition', 'content')) {
+      $plugin->execute($node, $op);
+    }
+  }
   if (module_exists('book')) {
     if ($plugin = context_get_plugin('condition', 'book')) {
       $plugin->execute($node, $op);
Index: context.plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/Attic/context.plugins.inc,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 context.plugins.inc
--- context.plugins.inc	30 Jul 2010 18:15:36 -0000	1.1.2.8
+++ context.plugins.inc	30 Jul 2010 20:39:46 -0000
@@ -62,6 +62,13 @@ function _context_context_registry() {
       'plugin' => 'context_condition_bookroot',
     );
   }
+  if (module_exists('content')) {
+    $registry['conditions']['content'] = array(
+      'title' => t('Content'),
+      'description' => t('Set this context when viewing a node with the selected content.'),
+      'plugin' => 'context_condition_content',
+    );
+  }
   if (module_exists('locale')) {
     $registry['conditions']['language'] = array(
       'title' => t('Language'),
@@ -205,6 +212,16 @@ function _context_context_plugins() {
       ),
     );
   }
+  if (module_exists('content')) {
+    $plugins['context_condition_content'] = array(
+      'handler' => array(
+        'path' => drupal_get_path('module', 'context') .'/plugins',
+        'file' => 'context_condition_content.inc',
+        'class' => 'context_condition_content',
+        'parent' => 'context_condition',
+      ),
+    );
+  }
   if (module_exists('book')) {
     $plugins['context_condition_book'] = array(
       'handler' => array(
Index: plugins/context_condition_content.inc
===================================================================
RCS file: plugins/context_condition_content.inc
diff -N plugins/context_condition_content.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/context_condition_content.inc	30 Jul 2010 20:39:46 -0000
@@ -0,0 +1,53 @@
+<?php
+// $Id$
+
+/**
+ * Expose node content as a context condition.
+ */
+class context_condition_content extends context_condition {
+  function condition_values() {
+    $values = array();
+    if (module_exists('content')) {
+      foreach (content_fields() as $field) {
+        if ($options = content_allowed_values($field)) {
+          foreach ($options as $key => $value) {
+            $values[$key] = $value;
+          }
+        }
+      }
+    }
+    return $values;
+  }
+
+  function condition_form($context) {
+    $form = parent::condition_form($context);
+    $form['#type'] = 'select';
+    $form['#size'] = 12;
+    $form['#multiple'] = TRUE;
+    $values = array();
+    foreach (content_fields() as $field) {
+      if ($options = content_allowed_values($field)) {
+        $values[$field['widget']['label']] = $options;
+      }
+    }
+    $form['#options'] = $values;
+    return $form;
+  }
+
+  function execute($node, $op) {
+    if ($this->condition_used()) {
+      foreach ($this->get_contexts() as $context) {
+        $values = $this->fetch_from_context($context, 'values');
+        foreach (content_fields() as $field) {
+          if (!empty($node->$field['field_name']) && $options = content_allowed_values($field)) {
+            foreach ($node->$field['field_name'] as $item) {
+              if (in_array($item['value'], $values)) {
+                $this->condition_met($context, $item['value']);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
