Skip to content

Instantly share code, notes, and snippets.

@robdecker
Last active November 2, 2019 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robdecker/5784592 to your computer and use it in GitHub Desktop.
Save robdecker/5784592 to your computer and use it in GitHub Desktop.
[Add active contexts to body classes] Insert into THEME_preprocess_page() #d6
// List active contexts from "context" module.
$contexts = context_active_contexts();
foreach ($contexts as $context) {
$vars['body_classes'] .= ' context_' . $context->name;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment