如何使当前语言不可点击?

时间:2017-10-16 15:52:13

标签: typo3

我的网站有两种语言,英语和德语。如果我目前在Enlgish verison中,并且与德语相同,我想让英语文本无法点击? 如何做到这一点我仍然是typoscript的新手?

编辑:我似乎无法找到方法 这是我的代码:

 20 = HMENU
  20 {
    special = language
    special.value = 0,3
    #,6,9
    special.normalWhenNoLanguage = 0
    wrap =
    1 = TMENU
    1 {
      noBlur = 1
      NO = 1
      NO {
        linkWrap = | |*|  | |
        stdWrap.override = EN || DE || NL || FR
        doNotLinkIt = 1
        stdWrap {
          typolink {
            parameter.data = page:uid
            additionalParams = &L=0 || &L=3 || &L=6 || &L=9
            addQueryString = 1
            addQueryString.exclude = L,id,cHash,no_cache
            addQueryString.method = GET
            useCacheHash = 1
            no_cache = 0
          }
        }
      }
      ACT < .NO
      #ACT.linkWrap = |&#124;
      ACT.stdWrap.typolink.ATagParams = class="active"
      USERDEF1 < .NO
      USERDEF1 {
        linkWrap = <span class="inactive">|</span> |*| <span class="inactive">&nbsp;&#124;&nbsp;|</span>
        #linkWrap = <li class="text-muted">|</li>
        stdWrap.typolink >
      }

      USERDEF2 < .USERDEF1
      #USERDEF2 < .ACT
      #USERDEF2 {
      #  linkWrap = |
      #          linkWrap = <li class="text-muted">|</li>
      #  stdWrap.typolink >
      #}
    }
  }

}

1 个答案:

答案 0 :(得分:1)

这是一个有效的TypoScript示例:

   lib.language = COA
    lib.language {
       20 = HMENU
       20 {
          special = language
          # List of language-IDs (0 = Default, 1 = englisch)
          special.value = 0,1
          1 = TMENU
          1 {
             wrap = <ul>|</ul>
             NO = 1
             NO {
                stdWrap.cObject = TEXT
                stdWrap.cObject {
                   value = DE || EN 
                   # Menu in english  
                   lang.en = DE || EN
                }
                allWrap = <li>|</li>
             }
             ACT < .NO
             # this is the important Part!
             ACT {
                doNotLinkIt = 1               
                allWrap = <li class="acive">|</li>
             }
             #   (if the Page isn't translated)
             USERDEF1 < .NO
             USERDEF1 {
                doNotLinkIt = 1
                allWrap = <li class="empty">|</li>
             }
             # Selected Language (if the Page isn't translated)
             USERDEF2 < .NO
             USERDEF2 {
                doNotLinkIt = 1
                allWrap = <li class="active empty">|</li>
             }
          }
       }
    }

重要的部分是ACT.doNotLinkIt = 1