【问题标题】:How can I set baseVariants for a multidomain TYPO3 v9?如何为多域 TYPO3 v9 设置 baseVariants?
【发布时间】:2019-08-22 16:40:58
【问题描述】:

TYPO3 9.5.5 我有一个多域网站,它结合了多个页面树和每棵树的几种语言。我有一个以德语提供内容的页面树。这个可以在 domain.de、domain.at 和 domain.ch 上找到。然后是 domain.com、domain.nl 等的更多树(因为不同语言的内容结构差异很大)。

现在我想为本地开发和阶段服务器设置 baseVariants。我有一个这样的站点配置:

rootPageId: 1
base: /
baseVariants:
  -
    base: 'https://domain-de.local/'
    condition: 'applicationContext == "Development"'
languages:
  -
    title: Deutsch
    enabled: true
    languageId: '0'
    base: 'https://www.domain.de/'
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutschland
    hreflang: de-DE
    direction: ltr
    flag: de
  -
    title: Österreichisch
    enabled: true
    languageId: '1'
    base: 'https://www.domain.at/'
    typo3Language: de
    locale: de_AT.UTF-8
    iso-639-1: de
    navigationTitle: Österreich
    hreflang: ''
    direction: ltr
    fallbackType: strict
    flag: at

据我了解后端 GUI,我只能将顶级域 baseVariants 定义为主入口点,然后可以通过 /de//at/ 等路径控制下面的所有内容,对吗?在我的设置中,我需要'https://domain-at.local/',但我如何为这个变体设置目标 sys_language_uid(因为它们都将指向第一页树的默认语言)?

【问题讨论】:

    标签: typo3 typo3-9.x


    【解决方案1】:

    此功能无法通过 GUI 实现,但可以直接添加到 yaml 文件中。

    rootPageId: 1
    base: /
    baseVariants:
      -
        base: 'https://domain-de.local/'
        condition: 'applicationContext == "Development"'
    languages:
    
    ...
    
      -
        title: Austrian
        enabled: true
        languageId: '1'
        base: 'https://www.domain.at/'
        baseVariants:
          -
            base: 'https://domain-at.local/'
            condition: 'applicationContext == "Development"'
        typo3Language: de-AT
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-11
    • 2018-02-19
    • 1970-01-01
    • 2019-07-18
    • 1970-01-01
    • 1970-01-01
    • 2019-04-08
    • 1970-01-01
    相关资源
    最近更新 更多