[TYPO3] Navigation from other table than pages

christian oettinger christian.oettinger at gmx.de
Tue Jan 23 14:03:05 CET 2007


Hi all,

I want to create a Navigation from the table of my extension.
I found a snippet from Peter Klein that works great (see below). Now I 
want the link of each menu item to point to the actual pid and then add 
parameters. I fail even in the first part - linking to actual pid (or 
alternatively pid of my data, that would be OK too).
I tried with:
typolink.parameter.field
typolink.parameter.data = field:
inside the NO brackets - but no success.
Can anyone point me to the right direction?

thanks for any help, code below!
christian

______


page.includeLibs.usermenu = fileadmin/menuFunc.inc

lib.usermenu = HMENU
lib.usermenu.special = userfunction
lib.usermenu.special.userFunc = user_menuFunc->makeMenuArray
lib.usermenu.special.userFunc.table = tx_mytable
lib.usermenu.special.userFunc.select.pidInList = 4
lib.usermenu.1 = TMENU
lib.usermenu.1 {
   NO {
     stdWrap.field = name
     allWrap = <br>
   }
}

___________


<?php
class user_menuFunc {
function makeMenuArray($content,$conf) {
$menuArr = array();
$lConf = $conf["userFunc."];
$res = $this->cObj->exec_getQuery($lConf["table"],$lConf["select."]);
if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
$GLOBALS['TT']->setTSlogMessage($error,3);
} else {
$GLOBALS['TT']->setTSlogMessage('NUMROWS: 
'.$GLOBALS['TYPO3_DB']->sql_num_rows($res));
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$menuArr[] = $row;
}
}
return $menuArr;
}
}
?>


More information about the TYPO3-english mailing list