I have written a custom module and have defined a menu inside the module as test
. This menu uses a function named mymodule_test() to render contents. The code written for this menu is working perfectly OK and I am getting expected output on /test page.
Now, I want to define some more menus that use the same mymodule_test(). I understand that I can define more menu items in the mymodule_menu()
as below.
$items['test-1'] = array(
'title' => 'Test',
'page callback' => 'drupal_get_form',
'page arguments' => array('mymodule_test'),
'access arguments' => array('administer mymodule'),
'type' => MENU_NORMAL_ITEM,
);
However, I am planing to use more than 100 such menu and believe this is not the best way to achieve this. Please guide me in the right direction to achieve the same.
This is to note that these menus will be dynamic in nature so I cannot hard code it in the module file.
I am using Drupal 6.
array
. Right now I'm having same requirement for a website which I'm developing.