[TYPO3] TMENU from other table than 'pages'

Rens Admiraal typo3 at ambitiondesign.nl
Sat May 5 16:20:12 CEST 2007


Hi Peter,

Thanks for the link you gave me, I allready found the code before,  
but had better results with the other script I thougt :-) But,  
everything is working no :-)

just one additional question... is it also possible to use another  
column name as 'pid' field? If so I can also use the code to make a  
foldout menu...

maybe good to explain this ;-) I use the pid field to store the uid  
of the parent page, and the pgroup field to store the uid of the  
parent group. The table contains only groups, so if I want to make a  
foldout menu it has to select all records where pgroup = uid...





Op 5-mei-2007, om 12:49 heeft Peter Klein het volgende geschreven:

> Hi Rens. Try this script:
> http://www.typo3wizard.com/en/snippets/menus/create-menus-using- 
> data-from-other-tables-than-pages.html
>
> Then in the TS setup, change:
>
> typolink.parameter.field = www
>
> Into:
>
> typolink.parameter = 29
>
> --
> Peter Klein / Umloud Untd
>
>
> "Rens Admiraal" <typo3 at ambitiondesign.nl> wrote in message
> news:mailman.199423.1178359876.21067.typo3- 
> english at lists.netfielders.de...
>> Hi all,
>>
>> I'm trying to make a TMENU from records stored in another table  
>> than  the
>> 'pages' table. Doing that I encouter a little problem :-(
>>
>> I've used the following post as a resource: http://
>> lists.netfielders.de/pipermail/typo3-english/2007-January/035637.html
>>
>> The database structure is as follows:
>> tablename: e.g. table
>> fields: uid, pid, pgroup, title
>>
>> The uid, title and pid fields do what they normally do in typo, and
>> pgroup is the column I use in my script. All items showed in the menu
>> must have pgroup=0
>>
>>
>> So far, so good. The only thing I just can't accomplish is  
>> creating  the
>> correct link. The link must point to a page id which has nothing   
>> to do
>> with this table, and has a constant value of 29. With
>> stdWrap.typolink.additionalParams I try to add &pgroup=uid (in  
>> which  uid
>> has to be replaced by the value of field:uid), but it just  doesn't
>> work...
>>
>> The menu constantly makes the following link: index.php?id=uid (and
>> again, uid = field:uid)
>>
>> This is the TypoScript I use (menuFunc.php contains the script of   
>> Kasper
>> which you can find in the message I refer to above):
>>
>> page.includeLibs.usermenu = fileadmin/menuFunc.php
>>
>> temp.testmenu = HMENU
>> temp.testmenu.1 = TMENU
>> temp.testmenu.1 {
>>     expAll = 0
>>     wrap = <ul>|</ul>
>>     itemArrayProcFunc = user_itemArrayProcFuncTest
>>     itemArrayProcFunc.userFunc.oe_table = table
>>     itemArrayProcFunc.userFunc.select.pidInList = 26
>>     itemArrayProcFunc.userFunc.select.orderBy = sorting
>>     itemArrayProcFunc.userFunc.select.where = pgroup=0
>>     NO {
>>        ATagBeforeWrap = 0
>>        linkWrap = <li>|</li>
>>        stdWrap.data = field:title
>>        stdWrap.typolink.parameter.data = 29
>>        stdWrap.typolink.additionalParams = field:uid
>>        stdWrap.typolink.additionalParams.wrap= &pgroup=|
>>       #stdWrap.data = debug:data
>>    }
>> }
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list