如何仅在Drupal中显示Admin的形式



i创建一个Drupal中的模块,以显示前端的记录。现在,我想制作一个表格,以便管理员可以插入数据。我尝试与_menu()函数建立链接,但它不起作用。

这是我的代码

 function hello_menu(){
    $items = array();
    $items['hellopage'] = array(
        'title'=>'My Hello Page',
        'description'=>'Hello users',
        'page callback'=>'mutual_output',
        'access callback'=>'user_access',
        'access arguments'=>array('access content'),
        'type'=>MENU_NORMAL_ITEM        
    );
    $items['gethello'] = array(
        'page callback'=>'hello_ajaxCallHandler',
        'access callback'=>'user_access',
        'access arguments'=>array('access content'),
        'type'=>MENU_CALLBACK       
    );
    $items['admin/config/people/hello'] = array(
      'title' => 'hello module',
      'description' => 'Configuration for the hello module.',
      'page callback' => 'show_hello_form',
      'page arguments' => array('access content'),
      'access arguments' => array('administer users'),
      'type' => MENU_NORMAL_ITEM,
    );
    Return $items;  
} 

您的代码似乎正确。除了admin/config/people/hello中的"页面参数"行但这不应该破坏任何东西

您可以定义不工作的意思吗?挂钩菜单阵列被缓存,因此每次更改所有内容时都需要冲洗缓存。

最新更新