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_Tx News_Typo3 8.x - Fatal编程技术网

TYPO3在多语言应用程序中获取新闻记录标题

TYPO3在多语言应用程序中获取新闻记录标题,typo3,typoscript,tx-news,typo3-8.x,Typo3,Typoscript,Tx News,Typo3 8.x,我想将当前新闻文章标题添加到我的面包屑导航中。以下是我的输出: 网址: 默认值(德语) index.phpid=19& L=0& tx_news_pi1%5Bnews%5D=1& tx_news_pi1%5b控制器%5D=新闻& tx_news_pi1%5b操作%5D=详细信息& cHash=b182adf919054989c8d640e1da19f0a2 英语 index.php?id=19& tx_news_pi1%5Bnews%5D=1& tx_news_pi1%5b控制器%5D=新闻&

我想将当前新闻文章标题添加到我的面包屑导航中。以下是我的输出:

网址:

默认值(德语)

index.phpid=19&

L=0&

tx_news_pi1%5Bnews%5D=1&

tx_news_pi1%5b控制器%5D=新闻&

tx_news_pi1%5b操作%5D=详细信息&

cHash=b182adf919054989c8d640e1da19f0a2

英语

index.php?id=19&

tx_news_pi1%5Bnews%5D=1&

tx_news_pi1%5b控制器%5D=新闻&

tx_news_pi1%5b操作%5D=详细信息&

L=1&

cHash=b182adf919054989c8d640e1da19f0a2

法文

index.phpid=19&

L=2&

tx_news_pi1%5Bnews%5D=1&

tx_news_pi1%5b控制器%5D=新闻&

tx_news_pi1%5b操作%5D=详细信息&

cHash=b182adf919054989c8d640e1da19f0a2

正如您所看到的,我的面包屑导航的最后一部分不会被翻译。按照我的打字稿输出新闻标题

[globalVar = GP:tx_news_pi1|news > 0]
lib.nav_breadcrumb.20 = RECORDS
lib.nav_breadcrumb.20 {

    tables = tx_news_domain_model_news
    dontCheckPid = 1

    source {
        data = GP:tx_news_pi1|news
        intval = 1
    }

    conf.tx_news_domain_model_news = TEXT
    conf.tx_news_domain_model_news.field = title
    conf.tx_news_domain_model_news.htmlSpecialChars = 1

    wrap = <li class="breadcrumb-item active">|</li>

}
[global]
[globalVar=GP:tx_news_pi1|news>0]
lib.nav_breadcrumb.20=记录
lib.nav_面包屑{
tables=tx\u news\u domain\u model\u news
dontCheckPid=1
来源{
数据=GP:tx_新闻| pi1新闻
intval=1
}
conf.tx_news_domain_model_news=TEXT
conf.tx_news_domain_model_news.field=标题
conf.tx\u news\u domain\u model\u news.htmlSpecialChars=1
包裹=
  • |
  • } [全球]
    现在可以从新闻记录中获取标题。但仅限于主要语言。如何获取其他语言

    我的系统:

    • 打字3版本8.7.11
    • WebserverApache
    • PHP版本7.0.27-0+deb9u1
    • 数据库(默认)MySQL 5.5.5
    • 应用程序上下文生产
    • 作曲家模式已启用
    • 操作系统Linux 4.9.0-5-amd64
    • 新闻扩展6.3.0

    您应该使用
    内容,而不是
    记录
    ,在那里您可以选择更多需要的记录。
    使用
    CONTENT
    可以更改查询以选择包含要显示的
    sys\u language\u uid
    的记录,当然,对于默认语言以外的语言,您需要选择
    l10n\u parent
    而不是
    uid

    使用TS条件或stdwrap.if构建两种选择。

    我必须激活系统语言覆盖。现在一切都正常了

    config.sys_language_overlay = 1
    

    谢谢你的意见。我只需要激活sys_language_overlay就可以了。