Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
TYPO3菜单还显示未翻译的页面_Typo3_Typoscript_Typo3 7.6.x - Fatal编程技术网

TYPO3菜单还显示未翻译的页面

TYPO3菜单还显示未翻译的页面,typo3,typoscript,typo3-7.6.x,Typo3,Typoscript,Typo3 7.6.x,我有一个新的TYPO3安装,有4种语言,当我们在nav上工作时,发生了一件奇怪的事情:在切换语言时,未翻译的页面已经出现在nav上,尽管我们没有明确要求 系统是PHP5.5上的Typo37.6 下面是我们如何建造“花木”的: # the main menu boostrap like lib.navBarMenu = HMENU lib.navBarMenu { 1 = TMENU 1 { # accessibility - add title for main

我有一个新的TYPO3安装,有4种语言,当我们在nav上工作时,发生了一件奇怪的事情:在切换语言时,未翻译的页面已经出现在nav上,尽管我们没有明确要求

系统是PHP5.5上的Typo37.6

下面是我们如何建造“花木”的:

# the main menu boostrap like
lib.navBarMenu = HMENU
lib.navBarMenu {
    1 = TMENU
    1 {
        # accessibility - add title for main navigation
        wrap (
            <h2 class="sr-only">{$TEXT.titleMainnav}</h2>
            <ul class="nav navbar-nav" id="nav">|</ul>
        )

        # Always unfold all sub-levels of the menu
        expAll = 1

        # Remove the (old) default behaviour which adds onfocus="blurLink(this);" to all links
        noBlur = 1

        # Define the normal state (not active, not selected) of menu items
        # Using NO=1 to activate normal state is not necessary, but useful when copying
        NO = 1
        NO {
            # Use the page title field as title property in the A-tag, and if the navigation title is set, take the value of this field
            ATagTitle {
                field = title
                stdWrap.override.cObject = TEXT
                stdWrap.override.cObject.field = nav_title
                stdWrap.override.if.isTrue.field = nav_title
            }

            # Use the option-split feature to generate a different wrap for the last item on a level of the menu
            # The last item on each level gets class="last" added for CSS styling purposes.
            #
            # See the TSref documentation for details about option split and other features:
            # http://typo3.org/documentation/document-library/references/doc_core_tsref/current/
            #wrapItemAndSub = <li class="first">|</li> |*| <li>|</li> |*| <li class="last">|</li>
            wrapItemAndSub = <li>|</li>

            # HTML-encode special characters according to the PHP-function htmlSpecialChars
            stdWrap.htmlSpecialChars = 1
        }

        IFSUB = 1
        IFSUB < .NO
        IFSUB {
            wrapItemAndSub = <li class="dropdown">|</li>                 
            ATagBeforeWrap = 1
            ATagParams = class="dropdown-toggle" data-toggle="dropdown"
            stdWrap.wrap = |<b class="caret"></b>
        }

        # Copy properties of normal to active state, and then add a CSS class for styling
        ACTIFSUB = 1
        ACTIFSUB < .IFSUB
        ACTIFSUB {
            wrapItemAndSub = <li class="dropdown active">|</li>
        }

        CURIFSUB = 1
        CURIFSUB < .IFSUB
        CURIFSUB {
            wrapItemAndSub = <li class="dropdown active">|</li>
        }

        # Copy properties of normal to active state, and then add a CSS class for styling
        ACT = 1
        ACT < .NO
        ACT {
            wrapItemAndSub = <li class="active">|</li>
        }

        # Copy properties of normal to current state, and then add a CSS class for styling
        CUR = 1
        CUR < .NO
        CUR {
            wrapItemAndSub = <li class="active">|</li>
        }
    }
    2 < .1
    2 {
        wrap = <ul class="dropdown-menu">|</ul>
        IFSUB {
            wrapItemAndSub = <li class="dropdown-submenu">|</li>
            ATagParams >
            stdWrap.wrap >
        }

        ACTIFSUB {
            wrapItemAndSub = <li class="dropdown-submenu">|</li>
            ATagParams >
            stdWrap.wrap >
        }

        CURIFSUB {
            wrapItemAndSub = <li class="dropdown-submenu">|</li>
            ATagParams >
            stdWrap.wrap >
        }
    }
    3 < .2
    4 < .2
    5 < .2
    6 < .2
    7 < .2
}
#主菜单像
lib.navBarMenu=humenu
lib.navBarMenu{
1=t菜单
1 {
#辅助功能-为主导航添加标题
包裹(
{$TEXT.titleMainnav}
    ) #始终展开菜单的所有子级别 expAll=1 #删除将onfocus=“blurLink(this);”添加到所有链接的(旧)默认行为 noBlur=1 #定义菜单项的正常状态(未激活、未选中) #使用NO=1激活正常状态不是必需的,但在复制时很有用 否=1 没有{ #将页面标题字段用作A标记中的标题属性,如果设置了导航标题,则取此字段的值 阿塔吉特尔{ 字段=标题 stdWrap.override.cObject=文本 stdWrap.override.cObject.field=导航标题 stdWrap.override.if.isTrue.field=导航标题 } #使用选项拆分功能为菜单级别上的最后一项生成不同的换行 #每个级别上的最后一项都会添加class=“last”以用于CSS样式设置。 # #有关选项拆分和其他功能的详细信息,请参阅TSref文档: # http://typo3.org/documentation/document-library/references/doc_core_tsref/current/ #wrapItemAndSub=
  • *
  • *
  • |
  • wrapItemAndSub=
  • |
  • #HTML根据PHP函数htmlSpecialChars对特殊字符进行编码 stdWrap.htmlSpecialChars=1 } IFSUB=1 国际单项体育联合会 IFSUB{ wrapItemAndSub=
  • ATagBeforeWrap=1 ATagParams=class=“dropdown toggle”数据切换=“dropdown” stdWrap.wrap=| } #将正常状态的属性复制到活动状态,然后添加CSS类进行样式设置 ACTIFSUB=1 activifsub<.IFSUB ACTIFSUB{ wrapItemAndSub=
  • |
  • } CURIFSUB=1 CURIFSUB<.IFSUB 库里夫苏布{ wrapItemAndSub=
  • |
  • } #将正常状态的属性复制到活动状态,然后添加CSS类进行样式设置 ACT=1 第号法案 表演{ wrapItemAndSub=
  • |
  • } #将法线的属性复制到当前状态,然后添加CSS类进行样式设置 CUR=1 当前号 CUR{ wrapItemAndSub=
  • |
  • } } 2 < .1 2 { 包装=
      IFSUB{ wrapItemAndSub=
    • |
    • ATagParams> stdWrap.wrap> } ACTIFSUB{ wrapItemAndSub=
    • |
    • ATagParams> stdWrap.wrap> } 库里夫苏布{ wrapItemAndSub=
    • |
    • ATagParams> stdWrap.wrap> } } 3 < .2 4 < .2 5 < .2 6 < .2 7 < .2 }
      配置如下所示:

      config {
          # use html5 doctype
          doctype = html5
      
          # meta tag with charset
          metaCharset = utf-8
      
          # render with this charset
          renderCharset = utf-8
      
          # clean up HTML code
          disablePrefixComment  = 1
      
          # send additional headers
          #additionalHeaders = X-UA-Compatible: IE=Edge
      
          # do not put _INT-JS into external files
          removeDefaultJS = external
      
          # concatenate js files together
          concatenateJs = {$config.compression}
      
          # compress javascript files
          compressJs = {$config.compression}
      
          # move inline CSS to external files
          inlineStyle2TempFile = 1
      
          # concatenate css files together
          concatenateCss = {$config.compression}
      
          # compress CSS files
          compressCss = {$config.compression}
      
          # default target for external links
          extTarget = _blank
      
          # enable spam protect for email addresses and define the character offset
          spamProtectEmailAddresses = -4
      
          # in spam protected email link replace the at-sign with this html
          spamProtectEmailAddresses_atSubst = <span style="display:none">not shown</span>&#64;
      
          # in spam protected email link replace the last dot with this html
          spamProtectEmailAddresses_lastDotSubst = <span style="display:none">to make life hard for spam bots</span>.
      
          # use L parameter for the language and pass through page type parameter
          linkVars = L,type,noCompress
      
          # language key to use for xlf translations (default/de/fr/etc.)
          language = {$lang.current_key}
      
          # set the locale (eg. de_CH.UTF-8)
          locale_all = {$lang.current_locale}
      
          # reference the sys_language record
          sys_language_uid = {$lang.current_uid}
      
          # language key to use for the <html lang=""> attribute
          htmlTag_langKey = {$lang.current_key}
      
          # if a page is not available in the current language, fall back to language 0 (default)
          sys_language_mode = content_fallback ; 0
      
          # hide content records, which do not exist in the current language, set to 1 if the default language of the record should be shown
          sys_language_overlay = hideNonTranslated
      
          # show images of default language content in overlay record (commaseparated list)
          sys_language_softMergeIfNotBlank = tt_news:image
      
          # default date format (overwrite for other languages)
          dateFormat = %A %e. %B %Y
      
          # default time format (overwrite for other languages)
          timeFormat = Uhr %H:%M Sek %S
      
          # enable the admin panel
          admPanel = 1
      
          # clear cache once a day
          cache_clearAtMidnight = 1
      
          # default caching period for a page
          cache_period = 172800
      
          # prefix #hash-links with the current path (needed for realurl)
          prefixLocalAnchors = all
      
          # enable real url if present
          tx_realurl_enable = 1
      
          # allow links to be made across different domains
          typolinkEnableLinksAcrossDomains = 1
      
          # force extbase to select all fe_users
          tx_extbase.persistence.classes.Tx_Extbase_Domain_Model_FrontendUser.mapping.recordType >
      
          # force extbase to select all fe_groups
          tx_extbase.persistence.classes.Tx_Extbase_Domain_Model_FrontendUserGroup.mapping.recordType >
      
      
      }
      
      config{
      #使用html5 doctype
      doctype=html5
      #带字符集的元标记
      metaCharset=utf-8
      #使用此字符集进行渲染
      renderCharset=utf-8
      #清理HTML代码
      disablePrefixComment=1
      #发送附加标题
      #附加标头=X-UA-兼容:IE=边缘
      #不要将_INT-JS放入外部文件
      removeDefaultJS=外部
      #将js文件连接在一起
      concatenateJs={$config.compression}
      #压缩javascript文件
      compressJs={$config.compression}
      #将内联CSS移动到外部文件
      inlineStyle2TempFile=1
      #将css文件连接在一起
      concatenateCss={$config.compression}
      #压缩CSS文件
      compressCss={$config.compression}
      #外部链接的默认目标
      extTarget=\u blank
      #为电子邮件地址启用垃圾邮件保护并定义字符偏移量
      spamProtectEmailAddresses=-4
      #在受垃圾邮件保护的电子邮件链接中,用此html替换at标志
      spamProtectEmailAddresses_atSubst=未显示@;
      #在垃圾邮件保护电子邮件链接中,用此html替换最后一个点
      spamProtectEmailAddresses\u lastDotSubst=使垃圾邮件机器人的生活变得艰难。
      #对语言使用L参数,并传递页面类型参数
      linkVars=L,类型,无压缩
      #用于xlf翻译的语言键(默认值/de/fr/等)
      语言={$lang.current_key}
      #设置区域设置(如de_CH.UTF-8)
      locale\u all={$lang.current\u locale}
      #参考系统语言记录
      sys_language_uid={$lang.current_uid}
      #用于属性的语言键
      htmlTag_langKey={$lang.current_key}
      #如果页面在当前语言中不可用,请返回到语言0(默认)
      sys\u language\u mode=content\u fallback;0
      #如果显示记录的默认语言,则将当前语言中不存在的隐藏内容记录设置为1
      sys\u language\u overlay=hideNonTranslated
      #在覆盖记录中显示默认语言内容的图像(逗号分隔列表)
      sys\u language\u softMergeIfNotBlank=tt\u新闻:图片
      #默认日期格式(覆盖其他语言)
      dateFormat=%A%e.%B%Y
      #默认时间格式(覆盖其他语言)
      时间格式=
      
      config.sys_language_mode = strict