By mfitowski on
Hi,
I tried to find answer to my issue, but unsuccessfully...
I have developed a module for Drupal 5.x and wanted to port it to version 6.x. One of issues is _menu() hoook. I use
'type' => MENU_DYNAMIC_ITEM menu item type to display a list of items from database.
It looks like in Drupal 6.x this type of item is no longer supported.
Does anyone have developed any way to workaround this? I need to have a dynamic menu upadated every time database is changed.
Help!
Sample code of my menu:
// loop through all processes
while ($impr = db_fetch_object($result)) {
// display process name
$items[] = array(
'path' => 'dr/process/'. $impr->id,
'title' => $impr->name,
'description' => $impr->description,
'callback' => '_dr_process_show',
'callback arguments' => array(arg(2)),
'access' => user_access('list processes'),
'type' => MENU_DYNAMIC_ITEM, 'weight' => 4
);
}
Thanks in advance for any ideas.
--
Best regards,
Mariusz
Comments
Try this
I've been looking for a similar result.
This may help:
http://drupal.org/node/140311
-R