Posted By

jonathanpglick on 09/16/11


drupal Context drupal7

Versions (?)

Trigger a Drupal Context programatically

 / Published in: PHP

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

  1. $context = context_load('context_name');
  2. context_set('context', $context->name, $context);

Report this snippet  

You need to login to post a comment.