Render Views display programmatically


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

Example from New Play Map


Copy this code and paste it in your HTML
  1. $view2 = views_get_view('events');
  2. $view2->set_display('panel_pane_3');
  3. $view2->set_arguments(array($all_plays_arg));
  4. $events = $view2->preview();
  5.  
  6. $output = $events;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.