[TYPO3-english] Flexible menu starting points
JoH asenau
info at cybercraft.de
Wed Jul 23 16:47:48 CEST 2014
> What would be more user friendly is to put only a checkbox "Menu
> starting point" but then i should do something like:
>
> if (levelfield:-1, menuroot, slide) == 1
> special.value = pageID_of_the_page_where_this_is_true
>
> so i wonder if this is possible? Thx!
In this case a fully TS based version would need a rootline menu to get
the uid of that particular page, but a userFunc might be the better
choice regarding performance.
lib.menu = COA
lib.menu {
10 = HMENU
10 {
special = rootline
special.range = 0|-1
1 = TMENU
1.NO {
doNotLinkIt = 1
stdWrap.cObject = LOAD_REGISTER
stdWrap.cObject {
mystartingpoint.field = uid
mystartingpoint.if.isTrue.field = menuroot
}
}
}
20 = HMENU
20 {
special = directory
special.value.data = register:mystartingpoint
... more menu stuff here
}
}
This way the register always gets the latest startingpoint from the
rootline.
And you don't have to assign that field to the rootline fields anymore,
since it is not fetched by levelfield.
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
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
More information about the TYPO3-english
mailing list