[TYPO3] Conditional menu
JoH asenau
info at cybercraft.de
Fri Sep 7 22:35:49 CEST 2007
> Just an update, I came up with the following TypoScript that doesn't
> work but may explain better what I'm trying to accomplish:
>
> side.menu_1 = HMENU
> side.menu_1.if {
> value.data = 4
> equals = treeLevel
> }
There's no if that would work like this in TYPO3.
Have a look at TSref to find out how to do it.
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/5/7/
TS is not a real language but a configuration array, so don't expect the
"if" settings to have any similarity to PHP or languages you might already
know.
> side.menu_1.isTrue.entryLevel = 3
> side.menu_1.isFalse.entryLevel = 1
Doesn't exist, thus won't do anything.
What you are looking for is called "Conditions".
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/
One of them is treeLevel so you can do something like this:
First setup the default (same as the "isFalse" in your example)
side.menu_1 = HMENU
side.menu_1 {
entryLevel = 1
1 = TMENU
1 {
# blah
}
}
# then come up with the condition
[treeLevel = 4]
side.menu_1.entryLevel = 3
[global]
That's all
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