Tuesday, January 25, 2011

Create Admin Tab Effect functionality

Example code:
------------

Note: Paste the below code in any custom module file.


/* Start of Event Registration - Admin Interface */
$items['admin/content/eventregistration'] = array(
'title' => 'Awaiting for Approval',
'page callback' => 'drupal_get_form',
'page arguments' => array('listof_eventregistered_users'),
'access arguments' => array('access administration pages'),
);
$items['admin/content/eventregistration/list'] = array(
'title' => 'Awaiting for Approval',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10);

$items['admin/content/eventregistration/confirmed'] = array(
'title' => 'Approved Users',
'page callback' => 'drupal_get_form',
'page arguments' => array('listof_eventconfirmed_users'),
'access arguments' => array('access administration pages'),
'type' => MENU_LOCAL_TASK,
);

$items['admin/content/eventregistration/cancelled'] = array(
'title' => 'Rejected Users',
'page callback' => 'drupal_get_form',
'page arguments' => array('listof_eventcancelled_users'),
'access arguments' => array('access administration pages'),
'type' => MENU_LOCAL_TASK,
);
/* End of Event Registration - Admin Interface */

No comments:

Popular Posts