TYPO3: show/hide specific menu items depending on current language -
typo3 version 6.1
my page structure:
root page1 subpage1-1 subpage_only_for_fr_1-2 subpage_only_for_de_1-3 page2 subpage2-1 subpage2-2
my menu structure same (except root item):
page1 subpage1-1 subpage_only_for_fr_1-2 subpage_only_for_de_1-3 page2 subpage2-1 subpage2-2
my menu ts is:
leftnav = hmenu leftnav { 1 = tmenu 1 { wrap = <ul>|</ul> no = 1 no { wrapitemandsub = <li>|</li> stdwrap.field = title } act = 1 act { wrapitemandsub = <li class="active">|</li> stdwrap.field = title } } 2 < .1 }
i have 1 additional language site (default = deutsch, additional = french):
[globalvar=gp:l=0] config.sys_language_uid = 0 config.language = de [global] [globalvar=gp:l=2] config.sys_language_uid = 2 config.language = fr [global]
i want show/hide pages in menu depending on current language.
for example, if user switch language french, want show page subpage_only_for_fr_1-2 in menu , hide subpage_only_for_de_1-3. , vice verca.
how can accomplish that?
solved! here simple solution:
just need check out fields under language section on behaviour tab (when eyou edit page):
language localization hide default translation of page hide page if no translation current language exists
1) fields need in deutsch language, make checkbox "hide page if no translation current language exists" active. note: shouldn't add translations them in french.
2) fields need in french, make checkbox "hide default translation of page" active. because default language.
and typo3 hide/show needed pages depending on current language correctly!
Comments
Post a Comment