[TYPO3] Getting parent id in menu
JoH asenau
info at cybercraft.de
Wed May 23 00:06:36 CEST 2007
> I want the 'Meat' link under 'Food' to have id=7&Section=3
>
> I manage to add the query string to the link, but I'm unable to get
> the correct Id...
>
> This is my TS for level 2 menu
>
> #--------------------------------------
> temp.menu_1.2 = TMENU
> temp.menu_1.2 {
> expAll=1
> noBlur=1
> wrap=<ul> | </ul>
>
> NO.wrapItemAndSub = <li> | </li>
> NO.doNotShowLink = 1
> NO.before.cObject = TEXT
> NO.before.cObject {
> field = nav_title
> typolink.parameter.field = uid
> typolink.additionalParams.data = leveltitle:-2
> typolink.additionalParams.wrap = §ion=|
> }
> }
>
> #--------------------------------------
>
>
> I user leveltitle:-2 as a test, but I have always section=Recipes,
> even in links under 'Food'...
>
> What am I doing wrong ?
leveltitle will always point to a page in the rootline of the page you are
currently viewing.
What you need is the parent of a page that is currently rendered in a menu,
which is something completely different.
So leveltitle, leveluid, levelmedia won't work at all.
But it seems you do it a bit complicated anyway, since every page record
already got the information you want:
There is a field called pid (short for: parent id) so this should work
typolink.parameter.field = uid
typolink.additionalParams.field = pid
typolink.additionalParams.wrap = §ion=|
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
More information about the TYPO3-english
mailing list