By nick.c on
I am new to drupal and I am having a look at modules.
I've created a tab menu and am loading the secondary tabs from the database. They are being cached though so when the database changes the menu stays the same.
How do I alter the following to prevent this caching problem?
$items['milkshake'] = array(
'title' => 'Milkshake flavors',
'access arguments' => array('list flavors'),
'page callback' => 'milkshake_overview',
'type' => MENU_NORMAL_ITEM
);
$items['milkshake/list'] = array(
'title' => 'List flavors',
'access arguments' => array('list flavors'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' =>0
);
$items['milkshake/add'] = array(
'title' => 'Add flavor',
'access arguments' => array('add flavor'),
'page callback' => 'milkshake_add',
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$sql = "SELECT * FROM {milkshake} ORDER BY flavor ASC";
$result = db_query(db_rewrite_sql($sql));
while ($data = db_fetch_object($result)) {
$items['milkshake/list/'.$data->flavor] = array(
'title' => ucwords($data->flavor).' flavors',
'access arguments' => array('list flavors'),
'page callback' => 'milkshake_list',
'page arguments' => array(2),
'type' => MENU_LOCAL_TASK,
);
}Thanks