[TYPO3] Navigation from other table than pages

Peter Klein peter at umloud.dk
Wed Jan 24 13:10:46 CET 2007


Hi Christian.

Try adding this line inside the NO part. (instead of the "stdWrap.field = 
name")

stdWrap.data = debug:data

That should show you which database fields are available. (Provided that you 
have enabled debugoutput in the Install tool)

So if you have made a field named "pid", and see that in the debug info, 
then you should be able to do it like this:

(remember to remove the debug line again)

typolink.parameter.field = pid

And if you need to add dynamic parameters (in this example the field with 
the extra info is named "myparams") , from your tabel, to the links, you can 
do something like this:

typolink.parameter.additionalParams = COA
typolink.parameter.additionalParams {
  10 = TEXT
  10.field = myparams
  10.wrap = &tx_myextension[myparams]=|
}

-- 
Peter Klein/Umloud Untd

"christian oettinger" <christian.oettinger at gmx.de> skrev i en meddelelse 
news:mailman.1.1169557386.22328.typo3-english at lists.netfielders.de...
> 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