Drupal print views programmatically


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

In this example,
create a block view, where f_tg_list is the views name.


Copy this code and paste it in your HTML
  1. $view = views_get_view('f_tg_list');
  2. $type = 'block';
  3.  
  4. $use_pager = false;
  5. $f_tg_list = views_build_view($type, $view, $args = array(), $use_pager, $limit);
  6.  
  7. print $f_tg_list;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.