Last active
November 2, 2019 02:05
-
-
Save robdecker/88676fbd2acdf05dfd3c to your computer and use it in GitHub Desktop.
[Add module to admin/config page] http://drupal.stackexchange.com/questions/1757/how-to-add-module-to-admin-config-page-in-drupal-7 http://drupalst.com/blog/add-menu-block-administrator-configuration-page #d7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_menu(). | |
*/ | |
function mymodule_menu() { | |
$items = array(); | |
$items['admin/config/mymodule'] = array( | |
'title' => 'My configuration section', | |
'description' => 'This is the parent item', | |
'position' => 'left', | |
'weight' => -100, | |
'page callback' => 'system_admin_menu_block_page', | |
'access arguments' => array('administer site configuration'), | |
'file' => 'system.admin.inc', | |
'file path' => drupal_get_path('module', 'system'), | |
); | |
// Need at least one child item before your section will appear. | |
$items['admin/config/mymodule/item'] = array( | |
'title' => 'First item', | |
'description' => 'This is the first child item in the section', | |
'page callback' => 'mymodule_item_callback', | |
'access arguments' => array('administer site configuration'), | |
); | |
return $items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment