Hide a page in default language (but show it in alternative languages) - typo3

I setup a Typo3 7.6 with multilanguage and I need to be able to hide some pages in default language, but show it in alternative languages.
The problem is, when I hide the page in the default languages, all other languages are hidden too. Or, when I am logged in, I get the PREVIEW Info, in all languages.
The other way around, hiding a alternative language, works fine and I can still access the default language.
This is my typoscript:
config {
htmlTag_langKey = en
sys_language_uid = 0
language = en
locale_all = en_EN
sys_language_overlay = hideNonTranslated
sys_language_mode = strict
}
[globalVar = GP:L = 1]
config {
htmlTag_langKey = 1
sys_language_uid = 1
language = de
locale_all = de_CH
sys_language_overlay = hideNonTranslated
sys_language_mode = strict
}
So is it possible to hide the default language in typo3 7.6? The alternative would be to use a dummy-default-language and use the current default language as an alternative language too.

Just edit the page record, go to the behaviour tab. Under Language Localization you will find the option: hide default translation of page.

Related

detail page title in browser drops to a backend news detail page title

It is not a bug, of course, but i cant figure out how to solve it.
With previous version of News there was all fine.
Sorry for my language, it hard to explain.
Current Behavior
For example - I have this page title behaivor for the first time news detail page visit -
"SiteName: Some NewsRecord Title" (this is fine, how it should be).
Then when i go to list view, and again click on news to view it in detail (or just refresh the page I'm currently viewing) - page title gets look like this:
"SiteName: news" where "news" is a page title in the backend page tree, that contains newsDetailView plugin
To override this strange behavior, i use such typoscript setup (But this should not be a permanent solution to the problem, of course)
[globalVar = TSFE:id = 7]
config.noPageTitle = 2
temp.newsTitle = RECORDS
temp.newsTitle {
dontCheckPid = 1
tables = tx_news_domain_model_news
source.data = GP:tx_news_pi1|news
source.intval = 1
conf.tx_news_domain_model_news = TEXT
conf.tx_news_domain_model_news {
field = title
htmlSpecialChars = 1
}
wrap = <title>SiteName: |</title>
}
page.headerData.1 >
page.headerData.1 < temp.newsTitle
[global]
Environment
TYPO3 version(s): [9.5.15]
news version: [8.0.0]
Composer (Composer Mode): [no]
With 9.5 and the nice SEO extension you really shouldn't do such stuff anymore. Don't use config.noPageTitle and it should work out of the box as the news extension will set the title just right.

Field from default language should be valid for all languages

I'm using this bit of Typoscript and a Templavoilà Plus input field to generate some text.
10 = TEXT
10.value.field = field_test
I work with English (default) and German contents. When I translate a content to German, the backend user has to fill in again field_test, which is the normal behaviour.
Modifying the Typoscript, how can I only use the English (default) content of the field_test even in the German content?
Put in other words, how can I get the value of a field of a particular language?
I saw LLL: and l10n_mode, can they be of any help? And if so, how can you use them in that case?
Is it even possible to achieve that with a simple Header of a tt_content?
Or could I use something like that to disable localisation of a single Templavoilà field ?
config.sys_language_softExclude = tt_content:subheader
config.sys_language_softMergeIfNotBlank = tt_content:subheader
The reason why I'm asking this, is because it would be quite useful not to have to fill in again TV fields for links or images for example…
Here is my Typoscript, where field_test is created with Templavoilà and filled in by an backend editor:
5 = IMAGE
5 {
if.isTrue.field = field_test
file = fileadmin/icons/test.png
wrap = <li>|</li>
imageLinkWrap = 1
imageLinkWrap.enable = 1
imageLinkWrap.typolink.parameter.field = field_test
}
I have tried modifying the Data Structure XML as follow, but even though I have no content in the German field_test, it doesn't display the Default/English content.
<meta type="array">
<langDisable>1</langDisable>
<langChildren>1</langChildren>
</meta>
…
<field_test type="array">
<tx_templavoilaplus type="array">
<title>Test</title>
<langOverlayMode>ifBlank</langOverlayMode>
…
</field_test>
A complete guess, maybe insertData = 1 helps out??
5 = IMAGE
5 {
if.isTrue.field = field_test
file = fileadmin/icons/test.png
wrap = <li>|</li>
imageLinkWrap = 1
imageLinkWrap.enable = 1
imageLinkWrap.insertData = 1
imageLinkWrap.typolink.parameter.field = field_test
}

Translation of content elements in tx_news shows default language

Environment:
TYPO3: 8LTS
News: 6.3.0 (also checked with 7.x)
News List View (Page) is translated
News Detail View (Page) is translated
News Record translated
Problem:
When i visit the page on language UID 1 the news record itself is translated (For example headline). In the Detail view we render the content element. This is always shown in the default language
The Problem could be fixed by switching sys_language_overlay from 0 to 1
config {
sys_language_mode = content_fallback
sys_language_overlay = 1
}
To prevent that the content elements are hidden by default you could also set
TCEMAIN.table.tt_content {
disablePrependAtCopy = 1
disableHideAtCopy = 1
}

How can I create the right menu link with Typo3 DataProcessor to translated pages?

I have a problem with the DataProcessor / MenuProcessor in Typo3 8.7.
My site have two languages German (L=0) and English (L=2). In German all navigation links are OK, but when I switch to English, the main navigation translate all menu items to English, but the links shows to the german pages, not to the english ones.
The links should look like this:
German = /ueber-uns/
English = /en/about-us/
Links are working, realUrl do the Job. In my LanguageMenu the link translation works. But in my main navigation not.
My MainNavigationProcessor is:
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
levels = 2
includeSpacer = 1
as = mainnavigation
}
}
My LanguageMenu is:
dataProcessing {
40 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
40 {
special = language
special.value = 0,2
as = languagenavigation
if.isTrue = 0,2
}
}
A dump show this:
What do I wrong?
You need to define special type value like special.value not only value because of here you have use special menu for language.
Try this typoscript.
dataProcessing {
40 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
40 {
special = language
special.value = 0,2
as = languagenavigation
if.isTrue = 0,2
}
}
The Problem is solved. In Typo3 Setup this line helps:
config.linkVars = L
Better:
config.linkVars = L(0-2)

How to hide a plugin's title via Typoscript when rendering with css_styled_content

This is probably very basic, but I'm stuck.
In TYPO3 6.1.x with tx_news, I have configured the news detail view to appear on the same page as the list view as taught on http://docs.typo3.org/typo3cms/extensions/news/latest/Main/Tutorial/IntegrationWithTs/Index.html
Also, I have pulled in the news'header as h1 as such
temp.h1 = COA
temp.h1 {
10 = TEXT
10 {
value = <h1>{page:title}</h1>
insertData = 1
}
10 = RECORDS
10 {
if.isTrue.data = GP:tx_news_pi1|news
dontCheckPid = 1
tables = tx_news_domain_model_news
source.data = GP:tx_news_pi1|news
source.intval = 1
conf.tx_news_domain_model_news = TEXT
conf.tx_news_domain_model_news {
field = title
htmlSpecialChars = 1
}
wrap = <h1>|</h1>
}
}
What I couldn't solve yet is that the plugin element has a title (in the regular "header" field). I need to display this header only in the list, but hide that plugin's header field in detail view.
How / where can I do that via page TS?
This is probably not even in the plugin, but in css_styled_content?
Something like this...
[globalVar = GP:tx_news_pi1|news > 0]
plugin.tx_news.stdheader >
[else]
But how?
A plugin is always using this prototype object:
tt_content.list
Therefore you could delete the header of this object like that
tt_content.list.10 >
But if you have other plugins on the same page, their headers would also be deleted. So that would be a bad idea.
I would suggest you use the header_layout field. By default it has an entry called "Hidden" that will hide the header of your plugin. If you don't have it, check the Page TypoScript configuration. You can add own items by using:
TCEFORM.tt_content.headerLayout.addItems.99 = My Header Layout
Then you can then define the rendering of your own layouts in
lib.stdheader.10
(it's a CASE object)