Created
October 12, 2016 15:47
-
-
Save init90/c1c3d8315f26f83b259840465950564f to your computer and use it in GitHub Desktop.
Drupal 7, create tabs in hook_menu
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
| function social_links_menu() { | |
| $items['admin/config/system/social_links'] = array( | |
| 'title' => 'social_links', | |
| 'description' => 'Configure to fit clients needs', | |
| 'page callback' => 'drupal_get_form', | |
| 'page arguments' => array('social_links_settings'), | |
| 'access arguments' => array('administer site configuration'), | |
| 'file' => 'social_links.admin.inc', | |
| ); | |
| $items['admin/config/system/social_links/tab1'] = array( | |
| 'title' => 'Tab 1', | |
| 'type' => MENU_DEFAULT_LOCAL_TASK, | |
| 'weight' => -10 | |
| ); | |
| $items['admin/config/system/social_links/tab2'] = array( | |
| 'title' => 'Tab 2', | |
| 'type' => MENU_LOCAL_TASK, | |
| 'page callback' => 'some_callback', | |
| 'access arguments' => array('some permission') | |
| ); | |
| return $items; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment