[TYPO3-german] Sprachmenü nur aktiv wenn alternative Übersetzung existiert
Philipp Gampe
typo3.lists at philippgampe.info
Fri Oct 7 17:11:34 CEST 2011
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"> | </div>
> |*| <div class="NO">|</div><div
> class="SPC"> | </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"> | </div>
> |*| <div class="CUR">|</div><div
> class="SPC"> | </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
--
More information about the TYPO3-german
mailing list