TYPO3 - typoscript:通过ATagParams排除某些页面id不添加类?

时间:2017-08-03 12:23:05

标签: typo3 typoscript typo3-7.6.x

是否可以排除通过ATagParams为某些页面或根线添加类'myclass'? (我仍然希望它们作为链接出现在导航中......)

lib.navigation.main {

10 = HMENU
10 {
    entryLevel = 0
    1 = TMENU
    1 {
        expAll = 1
        wrap = <ul class="nav navbar-nav"> | </ul>
        NO = 1
        NO {
            subst_elementUid = 1
            ATagBeforeWrap = 1
            ATagParams = class="myclass"
            allStdWrap.insertData = 1
            wrapItemAndSub = <li>|</li> 
        }
...     

2 个答案:

答案 0 :(得分:2)

是的,因为TMENU的ATagParams得到了&#34; stdWrap&#34; -properties。如果你在TSref文档中看到任何东西都有stdWrap-properties,那么所有这些函数都可以在那里找到:https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Stdwrap/Index.html

要排除某些页面,您可以尝试使用ATagParams:

ATagParams = class="myclass"
ATagParams {
  # The pageIds you don't want to get this class
  if.value = 11, 22, 33
  if.isInList.field = uid
  if.negate = 1
}

这样的东西......我没有测试它。

答案 1 :(得分:2)

应该简化为:

ATagParams = class="myclass"
ATagParams {
  if.value = 11, 22, 33
  if.isInList.field = uid
  if.negate = 1
}