Reputation: 644
i'm trying to create a menubar with typoscript when im assigning an integer like 116
everything is working as expected but the thing is i dont know the page id and im getting from the session like this TSFE:fe_user|sesData|usergroup|menuProtectedRoot
in this case the menu fails to appear
MENU_PROTECTED_ROOT = HMENU
MENU_PROTECTED_ROOT {
special = directory
special.value = TSFE:fe_user|sesData|usergroup|menuProtectedRoot
...
but this will
MENU_PROTECTED_ROOT = HMENU
MENU_PROTECTED_ROOT {
special = directory
special.value = 116
...
im absolutely sure the variable is there i can even output in another subpart
SPAN = COA
SPAN {
10 = TEXT
10.data = TSFE:fe_user|sesData|usergroup|menuProtectedRoot
10.wrap = |
}
i have tried setting it as a constant in my template > same result
i make sure it's a integer using (int) when setting the variable in my controller
MENU_PROTECTED_ROOT = HMENU
MENU_PROTECTED_ROOT {
special = directory
special.value = TSFE:fe_user|sesData|usergroup|menuProtectedRoot
special.value.insertData = 1
no effect
MENU_PROTECTED_ROOT = HMENU
MENU_PROTECTED_ROOT {
special = directory
special.data = TSFE:fe_user|sesData|usergroup|menuProtectedRoot
no effect
Upvotes: 1
Views: 584
Reputation: 593
special.value
does not support getText[1] (so it won't resolve any values from TSFE, GP, etc.) unless you set insertData = 1
. Try this:
MENU_PROTECTED_ROOT = HMENU
MENU_PROTECTED_ROOT {
special = directory
special.value = {TSFE:fe_user|sesData|usergroup|menuProtectedRoot}
special.value.insertData = 1
[1] http://wiki.typo3.org/TSref/getText
Upvotes: 0
Reputation: 2055
Try this approach:
MENU_PROTECTED_ROOT = HMENU
MENU_PROTECTED_ROOT {
special = directory
special.value.stdWrap.data = TSFE:fe_user|sesData|usergroup|menuProtectedRoot
Definition of special.value
in HMENU[1] says that it can be stdWrap
type which includes data
parameter.
[1] http://wiki.typo3.org/TSref/HMENU
Upvotes: 3