Skip to main content
added 301 characters in body
Source Link

Another one approach, which proved to be quite useful:

$array = array('3250', '32'); 
$view = views_get_view('myview');
$view->set_display("myblock");
$view->pre_execute($array);
$view->execute();
$content = $view->render();

pre_execute() method of view object accepts arguments, that will be passed to corresponding contextual filters. E.g. '3250' will be passed to the first contextual filter, '32' - to the second one.

More info about method here.

Another one approach, which proved to be quite useful:

$array = array('3250', '32'); 
$view = views_get_view('myview');
$view->set_display("myblock");
$view->pre_execute($array);
$view->execute();
$content = $view->render();

Another one approach, which proved to be quite useful:

$array = array('3250', '32'); 
$view = views_get_view('myview');
$view->set_display("myblock");
$view->pre_execute($array);
$view->execute();
$content = $view->render();

pre_execute() method of view object accepts arguments, that will be passed to corresponding contextual filters. E.g. '3250' will be passed to the first contextual filter, '32' - to the second one.

More info about method here.

Source Link

Another one approach, which proved to be quite useful:

$array = array('3250', '32'); 
$view = views_get_view('myview');
$view->set_display("myblock");
$view->pre_execute($array);
$view->execute();
$content = $view->render();