hook-menu

Drupal hook_menu from module for admin menu

百般思念 提交于 2020-01-07 04:24:27
问题 I have a custom module "menu_mods" for adding menu items to the admin menu. It's not adding it. I want the link to show in the Navigation menu. I'm using the Garland theme for the admin pages. Here is my module code: function menu_mods_menu() { $items = array(); $items['admin/editfrontpage']=array( 'title'=>'Edit Homepage', 'description'=>'Edit Homepage.', 'page callback' => 'edit_front_page', 'access callback' => TRUE, 'type' => MENU_NORMAL_ITEM ); } function edit_front_page(){ $frontPageUrl

Drupal hook_menu explanation

☆樱花仙子☆ 提交于 2019-12-11 15:45:58
问题 I have been searching the net and i have not found out anywhere that explains the access callback and access arguments for hook_menu. What I think so far is that it controls who can access the module (correct me if I am mistaken). So can someone explain how hook_menu access callback and access arguments works and how you would go about if you were going to set the module to only administrators or only registered users to see your module. Also I am working on Drupal-7 回答1: I think what you are

Drupal excessive menu parts

懵懂的女人 提交于 2019-12-11 10:03:54
问题 In a module development (webtv) I am providing a generic block that can be configured for its contents (playlists). On the configure form there is a list of added contents (playlists) along with links "add new playlist" and "edit" existing one placed next to each entry. As the block configuration path is: "admin/build/block/configure/[my_module_name]/[block_delta]". And I am expecting to add/edit playlist form on a separate page and should be accessible on: admin/build/block/configure/[my