I need to change the appearance of a menu following the presence or absence of content in tt_content. For that, I did this but it does not work, I have errors on the test:
1 = TMENU
1 {
expAll = 1
doNotLinkIt = 1
IFSUB = 1
IFSUB {
doNotLinkIt = 1
typeOfMenu = 0
#typeOfMenu.override = 1
# pane content
contenu.cObject = COA
contenu.cObject {
10 = CONTENT
10 {
table = tt_content
select {
orderBy = sorting
pidInList.field = uid
where = {#colPos}=99 and deleted = 0 and hidden = 0
}
if.isTrue.data {
typeOfMenu = 1
}
# 20 = TEXT
# 20 {
# field = bodytext
# typeOfMenu.value.override.if {
# isTrue.data = 20.field
# }
# }
}
}
[globalVar = LIT:1 = typeOfMenu]
#[globalVar = LIT:1 = {$typeOfMenu}]
stdWrap {
typolink.parameter.field = uid
typolink.ATagParams = class="dropdown shrink" data-toggle="sous-menu{register:count_MENUOBJ}"
typolink.ATagParams.insertData = 1
}
[else]
stdWrap {
typolink.parameter.field = uid
typolink.ATagParams = class="vertical menu -- {register:typeOfMenu.value} --"
typolink.ATagParams.insertData = 1
}
[end]
...
- ERROR: Line 2244: Object Name String, "[globalVar" contains invalid character "[". Must be alphanumeric or one of: "_:-."
Does anyone have an idea? Best regards !
Aucun commentaire:
Enregistrer un commentaire