Search code examples
typo3typoscripttx-newstypo3-8.x

TYPO3 fetch news records title in multi language application


I want to add the current news article title to my breadcrumb navigation. Following is my output:

Breadcrumb output

URL:

Default (German)

index.phpid=19&

L=0&

tx_news_pi1%5Bnews%5D=1&

tx_news_pi1%5Bcontroller%5D=News&

tx_news_pi1%5Baction%5D=detail&

cHash=b182adf919054989c8d640e1da19f0a2

English

index.php?id=19&

tx_news_pi1%5Bnews%5D=1&

tx_news_pi1%5Bcontroller%5D=News&

tx_news_pi1%5Baction%5D=detail&

L=1&

cHash=b182adf919054989c8d640e1da19f0a2

French

index.phpid=19&

L=2&

tx_news_pi1%5Bnews%5D=1&

tx_news_pi1%5Bcontroller%5D=News&

tx_news_pi1%5Baction%5D=detail&

cHash=b182adf919054989c8d640e1da19f0a2

As you can see the last part in my breadcrumb navigation won't get translated. Following my TypoScript for the news title output.

[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]

This now fetches the title from the news records. But only from the main language. How can I fetch the other languages?

My System:

  • TYPO3 Version 8.7.11
  • Webserver Apache
  • PHP Version 7.0.27-0+deb9u1
  • Database (Default) MySQL 5.5.5
  • Application Context Production
  • Composer mode Enabled
  • Operating System Linux 4.9.0-5-amd64
  • News Extension 6.3.0

Solution

  • I had to activate sys_language_overlay. And now everything works

    config.sys_language_overlay = 1