Return to Snippet

Revision: 51166
at September 16, 2011 02:41 by jonathanpglick


Initial Code
$context = context_load('context_name');
context_set('context', $context->name, $context);

Initial URL

                                

Initial Description
It's not immediately clear from the `context_set()` function how to trigger a context to be "active" using code.  Do it like this:

Initial Title
Trigger a Drupal Context programatically

Initial Tags
drupal

Initial Language
PHP