Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Drupal 页面回调函数中的视图_Drupal_Drupal 7_Drupal Views - Fatal编程技术网

Drupal 页面回调函数中的视图

Drupal 页面回调函数中的视图,drupal,drupal-7,drupal-views,Drupal,Drupal 7,Drupal Views,在我的模块中,我有一个页面回调函数。我想在这个页面上的2个视图。我该怎么做 function MY_MODULE_menu() { $items['page-with-views/%'] = array ( 'title' => 'Page with vviews', 'page callback' => 'MY_MODULE_page_callback', 'page arguments' => array(1), 'access ca

在我的模块中,我有一个页面回调函数。我想在这个页面上的2个视图。我该怎么做

function MY_MODULE_menu() {
  $items['page-with-views/%'] = array
  (
    'title' => 'Page with vviews',
    'page callback' => 'MY_MODULE_page_callback',
    'page arguments' => array(1),
    'access callback' => TRUE,
  );

  return $items;
}

function MY_MODULE_page_callback() {
  //views_embed_view('view_name','block'); ???
}
答案如下: 拉拉拉拉