Hi, I'm trying to set the arguments I need for a particular view that I am printing on a page, but it is not working. This is how I call the view:

$view = views_get_view($name);

// Put all arguments and then execute.
$args = array('field_family_value=', 'field_manufacturer_nid[]=210');
$view->set_arguments($args);

And then I use $view->preview() to get the results.

The arguments are not working properly however...I've tried several different variations of they argument array, but no dice.
Any ideas?

Comments

dawehner’s picture

You should use array('', 210) as arguments.

dawehner’s picture

Status: Active » Fixed

And you should use preview($display_id = NULL, $args = array());

So if you use the $args as part of the preview call this should be fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.