I'm working on a custom module, and I'm building menu items using entries in a database. These are being cached, and the database is only really updated about once a month.
I'm having an issue getting wildcards to work with this menu.
Here's my menu structure that WORKS:
$dbconn = dbConnect();
$query = "SELECT TOP 3 id, title FROM table";
$q = mssql_query($query, $dbconn);
while($r = mssql_fetch_assoc($q)) {
$title = $r['title'];
$items[$title] = array(
'title' => $r['title'],
'description' => 'Page for ' . $r['title'],
'page callback' => 'programs_page',
'access callback' => TRUE,
'type' => MENU_NORMAL_ITEM,
);
}
mssql_close($dbconn);
But the moment I add the % into the array key, the menu items just disappear, like so:
$items[$title . "/%"];
Any suggestions on why drupal is tripping up on this? Even if I tack the ."/%" onto the $title variable, it doesn't work.