Powered by Drupal, an open source content management system

view

Importing a drupal view programmatically

If you need to import a drupal view programmatically, it is fairly simple:

	include_once(drupal_get_path('module', 'views') .'/views.module');
	include_once(drupal_get_path('module', 'views') .'/includes/view.inc');
	include_once(drupal_get_path('module', 'views') .'/includes/cache.inc') ;
	include_once(drupal_get_path('module', 'views') .'/includes/convert.inc'); 

        /* ... insert import code here */

	views1_import($view);

	$view->save();
Read more
Syndicate content