Display Views context display programmatically

/ Published in: PHP
Save to your folder(s)

Example used in New Play Map

Copy this code and paste it in your HTML
  1. $view = views_get_view('plays');
  2. $view->init_display('ctools_context_1');
  3. $plays = $view->execute_display('ctools_context_1', array($generative_artist));
  5. foreach($plays['view']->result as $each_play) {
  6. // do stuff
  7. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.