[TYPO3-english] Detecting if current output is content_fallback fails

J. Peter M. Schuler j.peter.m.schuler at icb.uni-due.de
Thu Mar 21 21:04:03 CET 2013


Hello everybody,

==Szenario==
I got quite a standard configuration in my 4.5 installation for multi-language support using:
config.sys_language_overlay = 1
config.sys_language_mode=content_fallback

So let's say the system has a page "Page A" and two languages ("en" (which is default) and "de") generating URLs like:
http://my.domain/en/page_a/ and http://my.domain/de/page_a/
If "Page A" has no German translation it shows up in English as intended. 

==Idea==
Now I came up with some TypoScript snippet I would like to apply to exactly this situation (page currently generated has no page translation for current language). This snippet could include e.g. a disclaimer on top of the content in the foreign language or a meta-directive for robots "noindex", so that only a translated or the default page gets indexed.

However I couldn't come up with a solution for the part detect if "page currently generated has no page translation for current language". I found that {TSFE:sys_language_contentOL} is selected language and {TSFE:sys_language_content} is rendered language (at least with that configuration) - however all conditions I tried didn't run.

==Problem==
The Condition 
[globalVar = TSFE:sys_language_content>0]
won't work. 

temp.test = TEXT
temp.test.value = content: {TSFE:sys_language_content} 
temp.test.insertData = 1 
Shows a  output: contentOL: 1 - content: 1
So the conditions seem broken, although the variable is there.

== Question ==
Could somebody point me to my error - I seriously don't get it. 

Thanks for reading and kind regards,
Peter


More information about the TYPO3-english mailing list