[TYPO3-german] Sprachmenü nur aktiv wenn alternative Übersetzung existiert

Rainer Schleevoigt rainer at webmasterei-hamburg.de
Fri Oct 7 17:31:23 CEST 2011


On 10/7/11 5:23 PM, Maria Meilinger wrote:
> Hallo Phil,
>
> ja in die Doku zu schauen hätte auch geholfen ;-)
> hab erstmal alle Foren durchsucht.
Dir zum Troste: ich lese Handbücher auch immer zuletzt ;-)
> Vielen Dank!
>
> -------- Original-Nachricht --------
>> Datum: Fri, 07 Oct 2011 17:11:34 +0200
>> Von: Philipp Gampe<typo3.lists at philippgampe.info>
>> An: typo3-german at lists.typo3.org
>> Betreff: Re: [TYPO3-german]	Sprachmenü nur aktiv wenn alternative Übersetzung existiert
>> Maria Meilinger wrote:
>>
>>> dann mache ich etwas falsch ;-((
>>>
>>> schau mal, das ist mein Sprachmenü
>>>
>>>
>>>    temp.MENU = HMENU
>>>      temp.MENU {
>>>          special = language
>>>          special.value = 0,1,2
>>>          addQueryString = 1
>>>          addQueryString.exclude = L,cHash
>>>      1 = TMENU
>>>      1 {
>>>         # expAll = 1
>>>         noBlur = 1
>>>         NO = 1
>>>         NO {
>>>           #doNotLinkIt = 1
>>>           stdWrap.cObject = TEXT
>>>           stdWrap.cObject.value = Deutsch || English || 中文
>>>           allWrap (
>>>           <div class="NO">|</div><div
>> class="SPC">&nbsp;&#124;&nbsp;</div>
>>>           |*|<div class="NO">|</div><div
>>>           class="SPC">&nbsp;&#124;&nbsp;</div>  |*|<div
>> class="NO">|</div>
>>>           )
>>>           ATagParams = class="normal"
>>>
>>>         }
>>>         ACT = 1
>>>         ACT {
>>>           #doNotLinkIt = 1
>>>           stdWrap.cObject = TEXT
>>>           stdWrap.cObject.value = Deutsch || English || 中文
>>>           allWrap (
>>>           <div class="CUR">|</div><div
>> class="SPC">&nbsp;&#124;&nbsp;</div>
>>>           |*|<div class="CUR">|</div><div
>>>           class="SPC">&nbsp;&#124;&nbsp;</div>  |*|<div
>> class="CUR">|</div>
>>>           )
>>>           ATagParams = class="active"
>>>
>>>         }
>>>
>>>      }
>>>        stdWrap.required = 1
>>>        stdWrap.wrap =<div id="c85" class="csc-default"><div
>>>        class="tx-srlanguagemenu-pi1">|</div></div>
>>>
>>>    }
>>>
>>> wenn ich die Option donotlinkit einsetze dann werden alle Menü Punkte
>>> deaktiviert. Ich schaff es nicht nur für diese ausgewählten Seiten zum
>>> Laufen zu bringen.
>> Aus der Doku:
>> http://typo3.org/documentation/document-
>> library/references/doc_core_tsref/4.5.0/view/1/7/#id2635004
>>
>> special.language
>>
>> Creates a language selector menu. Typically this is made as a menu with
>> flags for each language a page is translated to and when the user clicks
>> any
>> element the same page id is hit but with a change to the "&L" parameter in
>> the URL.
>>
>> The "language" type will create menu items based on the current page
>> record
>> but with the language record for each language overlaid if available. The
>> items all link to the current page id and only "&L" is changed.
>>
>> Note on item states:
>>
>> When "TSFE->sys_language_uid" matches the sys_language uid for an element
>> the state is set to "ACT", otherwise "NO". However, if a page is not
>> available due to the pages "Localization settings" (which can disable
>> translations) or if no Alternative Page Language record was found (can be
>> disabled with ".normalWhenNoLanguage", see below)  the state is set to
>> "USERDEF1" for non-active items and "USERDEF2" for active items. So in
>> total
>> there are four states to create designs for. It is recommended to disable
>> the link on menu items rendered with "USERDEF1" and "USERDEF2" in this
>> case
>> since they are disabled exactly because a page in that language does not
>> exist and might even issue an error if tried accessed (depending on site
>> configuration).
>>
>>
>> Also schöne das doNotLinkIt bei USERDEF1 und 2 reinwürgen ;)
>>
>> Sie auch hier: http://typo3blogger.de/sprach-menu/
>>
>> Viele Grüße
>> Phil
>> -- 
>> _______________________________________________
>> TYPO3-german mailing list
>> TYPO3-german at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german


-- 
Dipl.-Ing. Rainer Schleevoigt
Webmasterei Hamburg
iPhone/Android Developer
Certified TYPO3 Integrator
22303 Hamburg
Novalisweg 10



More information about the TYPO3-german mailing list