[Typo3-dev] Creation of custom MENU

Jan-Erik Revsbech jer at moccompany.com
Thu Jan 15 16:35:20 CET 2004


I have the problem that I need to compile a menu, where each menu item is compiled by my own script. No problem using the HMENU.special=userfunction, but what I want to do is to make a list, where each link has some additional parameter appended to the URL. For instance I would like my script to create a menu like this:

<a href="index.php?id=24&task=showItem&showID=234">Menuitem1</a>
<a href="index.php?id=24&task=showItem&showID=663">Menuitem2</a>
<a href="index.php?id=24&task=showItem&showID=562">Menuitem3</a>

Where each link is to the same page, but the parameter showID (there might be several parameter) is different for each menuitem. 
Does anybody know how to configure suvh a menu? I tried to modify the item via the IProcFunc, where I used this function code:

function user_itemProcFunc($menu,$conf) {
 // Fethc variable $THEID from database somewhere.
  $menu["linkHREF"]["HREF"].= "&task=showItem&itemID=$THEID";
  debug($menu["linkHREF"]);
  $count = 0;
  //while(list($key,$value) = each($menu)) { 
    //    print "Test: ".$value[linkHREF]."<br>";
  return $menu;
}

Any help would be appricated.

/Jan-Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20040115/70067d13/attachment.htm>


More information about the TYPO3-dev mailing list