[development] Creating admin pages.
rajasekharan
websweetweb at gmail.com
Fri Sep 18 23:25:36 UTC 2009
Hi,
I am working on a module that requires a few admin interfaces. The admin
interface needs to list something from the database. Additionally there
should be a tab in the same page that has a form to inserts data into
the db. I am using hook_menu to do this but am having a problem with
getting the tab to appear. Below is my code:
function obc_menu()
{
$items['admin/store/pcampaigns'] = array(
'title' => 'Product Campaigns',
'description' => 'Manage the campaigns that
the products in the store will support',
'access arguments'=>array('manage campaigns'),
'page callback'=>'obc_list',
'type'=>MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/store/pcampaigns/add'] = array(
'title'=> 'Add Campaign',
'description'=>'Add a
campaign',
'page
callback'=>'obc_add_pcampaign',
'access arguments' =>
array('manage campaigns'),
'type'=>MENU_LOCAL_TASK
);
return $items;
}
I have ubercart installed so there is a separeate section called
'Stores' like 'Site Building' and 'Site configuration'. What am I doing
wrong? How do I create a page and add a tab to it?
Raj
More information about the development
mailing list