我的TYPO3页面有以下TypoScript代码,可以使用自举导航。
MENU = HMENU
MENU.entryLevel = 0
#NAVIMAIN.excludeUidList =
MENU {
1 = TMENU
1 {
expAll = 1
NO.allWrap = <li>|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
ACT.ATagTitle.field = abstract // description // title
IFSUB = 1
IFSUB.before = <a href="#" class="dropdown-toggle" data-toggle="dropdown">
IFSUB.after = <b class="caret"></b></a>
IFSUB.doNotLinkIt = 1
IFSUB.wrapItemAndSub = <li class="dropdown">|</li>
IFSUB.ATagTitle.field = abstract // description // title
ACTIFSUB = 1
ACTIFSUB.before = <a href="#" class="dropdown-toggle" data-toggle="dropdown">
ACTIFSUB.after = <b class="caret"></b></a>
ACTIFSUB.doNotLinkIt = 1
ACTIFSUB.wrapItemAndSub = <li class="dropdown active">|</li>
ACTIFSUB.ATagTitle.field = abstract // description // title
wrap = <ul class="nav navbar-nav">|</ul>
}
2 = TMENU
2 {
expAll = 1
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
ACT.ATagTitle.field = abstract // description // title
ACTIFSUB = 1
ACTIFSUB.wrapItemAndSub = |
ACTIFSUB.before = <li class="divider"></li><li class="nav-header">
ACTIFSUB.after = </li>
ACTIFSUB.doNotLinkIt = 1
ACTIFSUB.ATagTitle.field = abstract // description // title
NO.allWrap = <li>|</li>
NO.ATagTitle.field = abstract // description // title
IFSUB = 1
IFSUB.before = <li class="divider"></li><li class="nav-header">
IFSUB.after = </li>
IFSUB.doNotLinkIt = 1
IFSUB.ATagTitle.field = abstract // description // title
SPC = 1
SPC.allWrap = <li class="divider"></li><li class="nav-header">|</li>
wrap = <ul class="dropdown-menu">|</ul>
}
如果我有2级导航,这绝对没问题。如何打印出第三级导航点?
它们应该只显示在第二级
感谢。
答案 0 :(得分:1)
&#34; 如何打印出第三级导航点?&#34;
与第二级完全相同(并且在第4级,第5级......第99级相同),您不需要在每个级别编写完整定义您可以继承来自某些早期版本,并覆盖所需的内容。适用于Bootstrap 3的样本
10 = HMENU
10 {
1 = TMENU
1.expAll = 1
1 {
NO.wrapItemAndSub = <li>|</li>
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
IFSUB < .NO
IFSUB = 1
IFSUB.wrapItemAndSub = <li class="dropdown">|</li>
IFSUB.ATagParams = class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"
ACTIFSUB < .ACT
ACTIFSUB.wrapItemAndSub = <li class="active dropdown">|</li>
ACTIFSUB.ATagParams = class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"
}
2 < .1 // level 2
2 {
wrap = <ul class="dropdown-menu">|</ul>
NO.wrapItemAndSub = <li>|</li>
}
3 < .2 // level 3
4 < .2 // level 4
5 < .2 // level 5
// ...
99 < .2 // level 99
}