Posted By

level09 on 04/03/09


Tagged

drupal views tpl


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

level09
ReeceMarsland


Create views programmatically


 / Published in: PHP
 

  1. <?php
  2.  
  3. $view_args = array();
  4. $display_id = 'page_1';
  5. $view = views_get_view('view_name');
  6.  
  7. //avoid error if view is not created yet !
  8. if ($view && !empty($view)) {
  9. print $view->execute_display($display_id , $view_args);
  10. }
  11. ?>

Report this snippet  

You need to login to post a comment.