Drupal视图2和3以编程方式呈现带参数的视图
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Drupal视图2和3以编程方式呈现带参数的视图相关的知识,希望对你有一定的参考价值。
//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();
以上是关于Drupal视图2和3以编程方式呈现带参数的视图的主要内容,如果未能解决你的问题,请参考以下文章