[TYPO3] checking for global variable, for disabling menu
JoH asenau
info at cybercraft.de
Thu Feb 22 12:42:09 CET 2007
Marko Milosevic wrote:
> Sorry, i have to write you whole code... I'm new to this, so... its
> easer this way...
>
> lib.country_menu = HMENU
> lib.country_menu {
> [...]
> 1 = GMENU
>
> [globalVar = GP:tx_commerce_pi1|catUid=155]
> 1.NO {
> noLink = 1
> }
> [global]
> [...]
> }
As I told you, conditions are not allowed inside curly braces.
You have to do it like this:
### First write the default code for the menu
lib.country_menu = HMENU
lib.country_menu {
[...]
1 = GMENU
1.NO {
[...]
}
[...]
}
### After that fill in the conditions that change this default behaviour
[globalVar = GP:tx_commerce_pi1|catUid=155]
lib.country_menu.1.NO.noLink = 1
[globalVar = GP:tx_commerce_pi1|catUid=123]
lib.country_menu.1.NO.whatever = blah
[globalVar = GP:tx_commerce_pi1|catUid=234]
lib.country_menu.1.NO.whatelse = blubb
[global]
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