Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. Michelle Moon Lee created this gist Nov 25, 2010.
    7 changes: 7 additions & 0 deletions Display Views context display programmatically
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    $view = views_get_view('plays');
    $view->init_display('ctools_context_1');
    $plays = $view->execute_display('ctools_context_1', array($generative_artist));

    foreach($plays['view']->result as $each_play) {
    // do stuff
    }