Posted By

jayboodhun on 06/18/10


Tagged

drupal views


Versions (?)

Embedding Views / displaying Views programatically


 / Published in: PHP
 

URL: http://www.jayboodhun.com

  1. $view = views_get_view($view_name);
  2. $display_id = 'page_1'; // Can be feed_1 or block_1
  3. $view->set_display($display_id);
  4. $view->preview = TRUE;
  5. $view->pre_execute(array()); //args
  6. $view->is_cacheable = FALSE;
  7. $data = $view->render($display_id); // render
  8. return $data;

Report this snippet  

You need to login to post a comment.