/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//OVERALL SCORE CALCULATION $display_id = 'default'; $foo = ''; $view = views_get_view('foobar'); $view->set_display($default_id); //replace name_of_filter with your filter machine name $view->set_display($display_id); $filter = $view->get_item($display_id, 'filter', 'name_of_filter'); $filter['value']['value'] = $filter_value; $view->set_item($display_id, 'filter', 'name_of_filter', $filter); //use this to count the results of your view //print the rendered version of your view print $view->render();