diff --git a/context.core.inc b/context.core.inc
index cff0aec..90e27c2 100644
--- a/context.core.inc
+++ b/context.core.inc
@@ -321,6 +321,9 @@ function context_context_page_condition() {
   if ($plugin = context_get_plugin('condition', 'context')) {
     $plugin->execute();
   }
+  if ($plugin = context_get_plugin('condition', 'variable')) {
+    $plugin->execute();
+  }
 }
 
 /**
diff --git a/context.plugins.inc b/context.plugins.inc
index 6f86559..da2f520 100644
--- a/context.plugins.inc
+++ b/context.plugins.inc
@@ -36,6 +36,11 @@ function _context_context_registry() {
       'description' => t('Set this context when viewing a user page.'),
       'plugin' => 'context_condition_user_page',
     ),
+    'variable' => array(
+      'title' => t('Variable'),
+      'description' => t('Set this context when a system variable has the input value.'),
+      'plugin' => 'context_condition_variable',
+    ),
   );
   if (module_exists('menu')) {
     $registry['conditions']['menu'] = array(
@@ -203,6 +208,14 @@ function _context_context_plugins() {
       'parent' => 'context_condition',
     ),
   );
+  $plugins['context_condition_variable'] = array(
+    'handler' => array(
+      'path' => drupal_get_path('module', 'context') . '/plugins',
+      'file' => 'context_condition_variable.inc',
+      'class' => 'context_condition_variable',
+      'parent' => 'context_condition',
+    ),
+  );
   if (module_exists('taxonomy')) {
     $plugins['context_condition_node_taxonomy'] = array(
       'handler' => array(
diff --git a/plugins/context_condition_variable.inc b/plugins/context_condition_variable.inc
new file mode 100644
index 0000000..a6e33e5
--- /dev/null
+++ b/plugins/context_condition_variable.inc
@@ -0,0 +1,63 @@
+<?php
+
+/**
+ * Expose system variable as a context condition.
+ */
+class context_condition_variable extends context_condition {
+
+  function variable_options() {
+    global $conf;
+    $values = drupal_map_assoc(array_keys($conf));
+    return $values;
+  }
+
+  function condition_form($context) {
+     $default = $this->fetch_from_context($context, 'values');
+     $form['variable'] = array(
+      '#title' => $this->title,
+      '#description' => 'Variable',
+      '#options' => $this->variable_options(),
+      '#type' => 'radios',
+      '#default_value' => isset($default['variable']) ? $default['variable'] : '',
+    );
+    $form['code'] = array(
+      '#title' => 'Value',
+      '#description' => 'Input simple PHP conditional expression without php tags. Chosen variable value stays in $value.<br/>'.
+        'Eg:<br/>$value == true;<br/>$value[\'filter\'] == \'html\';',
+      '#type' => 'textarea',
+      '#default_value' => isset($default['code']) ? $default['code'] : '',
+    );
+    return $form;
+  }
+
+  /**
+   * Condition form submit handler.
+   */
+  function condition_form_submit($values) {
+    return $values;
+  }
+
+
+  function execute() {
+   if ($this->condition_used()) {
+      foreach ($this->get_contexts() as $context) {
+        $default = $this->fetch_from_context($context, 'values');
+        if ($this->match($default)) {
+          $this->condition_met($context);
+        }
+      }
+    }
+  }
+
+ function match($params) {
+    $value = variable_get($params['variable']);
+    $code = $params['code'];
+    ob_start();
+    eval('$output = ' . $code);
+    ob_end_clean();
+    if (!is_null($output)) {
+      return $output;
+    }
+    return false;
+  }
+}
\ No newline at end of file
