You are here

README.txt in Context: Variable 7

Same filename and directory in other branches
  1. 6 README.txt
Copyright (C) 2011  The Pennsylvania State University

Bryan Ollendyke
bto108@psu.edu

12 Borland
University Park,  PA 16802

***** USAGE *****
Install then add a context.  Select Variable Match, then write a name|value pair that you are trying to match.  Here's the description for how to use it from the module:

Map values as database variable|value. This will also accept variable|index:value in the case of arrays that are stored in the drupal variable table. %theme can be used to replace it with the current theme in use, accounting for og_theme

The use-case for building this was Spaces can override global settings based on Strongarm.  This module allows your contexts to dynamically react to minor global value overrides.  An example implementation is:

theme_%theme_settings|toggle_primary_links:0

This says "look at the active theme settings variable, then see if primary links are told not to render".  In this instance, the context will match and can display blocks or whatever it wants to.  In ELMS, this variable match allows you to toggle whether links display in the theme's primary links region or if a block should be rendered on the page (hence the if primary links are set to 0 do this).

File

README.txt
View source
  1. Copyright (C) 2011 The Pennsylvania State University
  2. Bryan Ollendyke
  3. bto108@psu.edu
  4. 12 Borland
  5. University Park, PA 16802
  6. ***** USAGE *****
  7. Install then add a context. Select Variable Match, then write a name|value pair that you are trying to match. Here's the description for how to use it from the module:
  8. Map values as database variable|value. This will also accept variable|index:value in the case of arrays that are stored in the drupal variable table. %theme can be used to replace it with the current theme in use, accounting for og_theme
  9. The use-case for building this was Spaces can override global settings based on Strongarm. This module allows your contexts to dynamically react to minor global value overrides. An example implementation is:
  10. theme_%theme_settings|toggle_primary_links:0
  11. This says "look at the active theme settings variable, then see if primary links are told not to render". In this instance, the context will match and can display blocks or whatever it wants to. In ELMS, this variable match allows you to toggle whether links display in the theme's primary links region or if a block should be rendered on the page (hence the if primary links are set to 0 do this).