打字错误 bootstrap 导航第三级打字错误 3

typoscript bootstrap navigation third level typo3

我的 TYPO3 页面有以下 TypoScript 代码以使用 bootstrap 导航。

       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 级导航,这绝对没问题。如何打印出第三层导航点?

它们应该只显示在第二层下

谢谢。

"如何打印出第三层导航点?"

与第二级完全相同(与第 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
}