typoscript - TYPO3 language menu with tx_news - hide language from menu if news record is not translated -


i want hide language language menu if news record not translated.

the following setup works pages. if page has no translation, "english" not shown in language menu on website.

i have behaviour not translated news records well.

the language menu far:

lib.language = coa lib.language {     20 = hmenu     20 {         special = language         special.value = 0,1         special.normalwhennolanguage = 0         wrap =         1 = tmenu         1 {             noblur = 1             no = 1             no {                 linkwrap = <li>|</li>                 stdwrap.override = deutsch || english                 stdwrap {                     typolink {                         parameter.data = page:uid                         additionalparams = &l=0 || &l=1                          atagparams = hreflang="de-de" || hreflang="en-gb"                         addquerystring = 1                         addquerystring.exclude = l,id,chash,no_cache                         addquerystring.method =                         usecachehash = 1                         no_cache = 0                     }                 }             }              act < .no             act.linkwrap = <li class="active">|</li>             userdef1 = 1             userdef1 {                 ldonotlinkit = 1                 stdwrap.cobject = text                 stdwrap.cobject.value =              }              userdef2 = 1             userdef2 {                 donotlinkit = 1                 stdwrap.cobject = text                 stdwrap.cobject.value =              }         }     }      wrap = <ul id="language_menu" class="language-menu">|</ul> } 

my typoscript configuration:

  config.sys_language_mode = strict   config.sys_language_overlay = hidenontranslated 

localconfiguration.php

[fe][hidepagesifnottranslatedbydefault] = 1 

you have manually set userdef1 state. utility class should help: https://gist.github.com/birger-fuehne/a8a97c94ec9346d691174462ccbfcfcc


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -