这是我的typoscript菜单:
page.10.variables {
menue = HMENU
menue {
#special = directory
#special.value = 17
wrap = <div id="mobile-header"><div class="bar"></div></div><div class="menu-collapsed"><div id="navigation"><nav class="nav"><ul>|</ul></nav></div></div>
1 = TMENU
1.expAll=1
1 {
NO {
wrapItemAndSub = <li>|</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
# linkWrap = |<span class="underline"></span>
ATagParams=class="navi"
}
RO = 1
RO {
wrapItemAndSub = <li>|</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
# linkWrap = |<span class="underline"></span>
ATagParams=class="navi"
}
ACT = 1
ACT {
wrapItemAndSub = <li> |</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
# linkWrap = |<span class="underline"></span>
ATagParams=class="navi_active"
}
IFSUB = 1
IFSUB {
wrapItemAndSub = <li> |</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
linkWrap = |<i class="fa fa-angle-down" aria-hidden="true"></i>
ATagParams=class="navi sub"
}
ACTIFSUB < .IFSUB
SPC = 1
SPC {
doNotLinkIt = 1
doNotShowLink = 1
allWrap = <div class="space"></div>
}
}
2 < .1
2.wrap = <ul class="nav_list1 subnavi resp">|</ul>
2.NO.wrapItemAndSub = <li> |</li>
2.ACT.wrapItemAndSub = <li> |</li>
3 < .2
3.wrap = <ul id="subsubnavi">|</ul>
}
menue2 = HMENU
menue2 {
special = directory
special.value = 62
1 = TMENU
1.expAll=1
1 {
wrap = <div class="box-menue2"><nav class="nav"><ul class="profile_tab">|</ul></nav></div>
NO {
wrapItemAndSub = <li>|</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
ATagParams=class="navi2"
stdWrap.dataWrap =<i class="fa fa-{field:tx_iconfont_icon}" aria-hidden="true"></i>
stdWrap.dataWrap.insertData=1
}
RO = 1
RO {
wrapItemAndSub = <li>|</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
stdWrap.dataWrap =<i class="fa fa-{field:tx_iconfont_icon}" aria-hidden="true"></i>
stdWrap.dataWrap.insertData=1
ATagParams=class="navi2"
}
ACT = 1
ACT {
wrapItemAndSub = <li> |</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
stdWrap.dataWrap =<i class="fa fa-{field:tx_iconfont_icon}" aria-hidden="true"></i>
stdWrap.dataWrap.insertData=1
ATagParams=class="navi2_active"
}
IFSUB = 1
IFSUB {
wrapItemAndSub = <li> |</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
linkWrap = |<i class="fa fa-angle-down" aria-hidden="true"></i>
ATagParams=class="navi2 sub"
}
ACTIFSUB < .IFSUB
SPC = 1
SPC {
doNotLinkIt = 1
doNotShowLink = 1
allWrap = <div class="space"></div>
}
}
2 < .1
2.wrap = <ul class="nav_list">|</ul>
2.NO.wrapItemAndSub = <li> |</li>
2.ACT.wrapItemAndSub = <li> |</li>
3 < .2
3.wrap = <ul id="subsubnavi">|</ul>
}
menue3 = HMENU
menue3 {
special = directory
special.value = 57
1 = TMENU
1.expAll=1
1 {
wrap = <div class="box-menue3"><nav class="nav3"><ul class="profile_tab">|</ul></nav></div>
NO {
wrapItemAndSub = <li>|</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
ATagParams=class="navi2"
stdWrap.dataWrap =<i class="fa fa-{field:tx_iconfont_icon}" aria-hidden="true"></i>
stdWrap.dataWrap.insertData=1
}
RO = 1
RO {
wrapItemAndSub = <li>|</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
stdWrap.dataWrap =<i class="fa fa-{field:tx_iconfont_icon}" aria-hidden="true"></i>
stdWrap.dataWrap.insertData=1
ATagParams=class="navi2"
}
ACT = 1
ACT {
wrapItemAndSub = <li> |</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
stdWrap.dataWrap =<i class="fa fa-{field:tx_iconfont_icon}" aria-hidden="true"></i>
stdWrap.dataWrap.insertData=1
ATagParams=class="navi2_active"
}
IFSUB = 1
IFSUB {
wrapItemAndSub = <li> |</li>
stdWrap.cObject = TEXT
stdWrap.cObject.field = subtitle // title
ATagBeforeWrap = 1
linkWrap = |
ATagParams=class="navi sub"
}
ACTIFSUB < .IFSUB
SPC = 1
SPC {
doNotLinkIt = 1
doNotShowLink = 1
allWrap = <div class="space"></div>
}
}
2 < .1
2.wrap = <ul class="nav_list">|</ul>
2.NO.wrapItemAndSub = <li> |</li>
2.ACT.wrapItemAndSub = <li> |</li>
3 < .2
3.wrap = <ul id="subsubnavi">|</ul>
}
FOO2 = HMENU
FOO2{
special = directory
special.value = 18
1 = TMENU
1 {
NO {
wrapItemAndSub = | |*| | |*| |
}
}
}
}
我需要在条件菜单上显示一些子元素。如果db == 0中的某个字段:显示一个菜单元素,则:显示第二个。可能吗 ?我希望你明白我的意思。有人可以帮帮我吗?
答案 0 :(得分:0)