【问题标题】:TYPO3 - Sidebar navigation li has no 'active' class when on page (active/current)TYPO3 - 侧边栏导航 li 在页面上时没有“活动”类(活动/当前)
【发布时间】:2018-07-10 07:58:09
【问题描述】:

TYPO3 - 侧边栏导航 li 在页面上时没有“活动”类(活动/当前)。我有这个侧边栏导航......但是在特定页面上 li 没有添加任何活动。有没有人看到有什么问题?

lib.navigation = COA
lib.navigation {
  20 = HMENU
  20 {
    entryLevel = 1
    1 = TMENU
    1 {
    expAll = 1
    #collapse = active 
    wrap = <ul class="sidebar-nav" id="menu">|</ul>
    NO {
        subst_elementUid = 1
        ATagBeforeWrap = 1
        allStdWrap.insertData = 1
        wrapItemAndSub = <li>|</li>
        }
    ACT <.NO
    ACT.wrapItemAndSub = <li class="active">|</li>
    CUR <.ACT
    #CUR <.NO
    #CUR = 1
    CUR.wrapItemAndSub = <li class="active">|</li>
    #CUR.linkWrap = <strong>|</strong>
    ... 
    }
    .... 
  }
}

【问题讨论】:

    标签: typo3 typoscript typo3-8.x typo3-8.7.x


    【解决方案1】:

    尝试添加 ACT = 1。与 NO 不同的是,ACT 和 CUR 默认不活动。

    有关更多信息,请参阅https://docs.typo3.org/typo3cms/TyposcriptReference/MenuObjects/CommonItemStates/Index.html

    【讨论】:

    • 或将NO = 1 添加到NO,然后再将其复制到ACTCUR、...。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-12
    相关资源
    最近更新 更多