[support] 404 or alias for menu hook

Metzler, David metzlerd at evergreen.edu
Mon Jan 28 19:24:17 UTC 2008


Yes, 

In drupal 4 & 5, the parent and default tab should generally have the
same callback and arguments. My bet in the example that you gave in the
last email is that the parent path's callback does not have a function
defined that returns a form.  Does that make sense? 

That is 
  admin/settings/mymodule/subsettings and
admin/settings/mymodule/subsettings/action1 should look the same except
for the menu type.  

I know its redundant, but it's necessary.  

Hopefully this makes sense, but if not, let me know what the tab user
experience is you're looking for and I'll try and mock up an example. 

Dave

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Ivan Sergio Borgonovo
Sent: Monday, January 28, 2008 10:19 AM
To: support at drupal.org
Subject: Re: [support] 404 or alias for menu hook

On Mon, 28 Jan 2008 08:01:14 -0800
"Metzler, David" <metzlerd at evergreen.edu> wrote:

> Would need to see the menu $items definitions for these to give
> better feedback.  It doesn't sound like you're generating the menu
> item correctly. 

mmm the menu works.
I get the "root" menu in the admin page, the submenu in the
navigation block and the tabs.

Menu hierarchy is something like:

$items[] = array(
'path' => 'admin/settings/mymodule',
'callback' => 'drupal_get_form',
'callback arguments' =>'mymodule_admin_settings',
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/settings/mymodule/subsettings',
'callback' => 'drupal_get_form',
'callback arguments' =>'mymodule_admin_settings2',
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/settings/mymodule/subsettings/action1',
'callback' => 'drupal_get_form',
'callback arguments' =>'mymodule_admin_settings3',
'type' => MENU_DEFAULT_LOCAL_TASK,,
);
$items[] = array(
'path' => 'admin/settings/mymodule/subsettings/action2',
'callback' => 'drupal_get_form',
'callback arguments' =>'mymodule_admin_settings4',
'type' => MENU_LOCAL_TASK,
);

admin/settings/rubbish -> list of modules
admin/settings/amodule/rubbish -> same page as admin/settings/amodule/
where amodule in (admin, fckeditor, localisation, uploads...)

But all those modules don't have submenu. So maybe it is something
related to submenus (?)

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

-- 
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list