Self-sorting TypoScript language menu


/ Published in: TYPO3
Save to your folder(s)

tba.

Based on "A nice Languagemenu made with TS" by typo3-book.com ( http://www.typo3-book.com/blog/index.php/2008/03/28/a-nice-languagemenu-made-with-ts/ )


Copy this code and paste it in your HTML
  1. menus.langMenu = HMENU
  2. menus.langMenu {
  3. special = language
  4. special.value = 0,1,2
  5. special.normalWhenNoLanguage = 0
  6. wrap =<ul id="langmenu">|</ul>
  7.  
  8. 1 = TMENU
  9. 1 {
  10. noBlur = 1
  11.  
  12. NO = 1
  13. NO {
  14. linkWrap =<li>|</li>
  15. stdWrap.override = Deutsch || English || Slovenš�ina
  16. doNotLinkIt = 1
  17. stdWrap.typolink.parameter.data = page:uid
  18. stdWrap.typolink.additionalParams = &L=0 || &L=1 || &L=2
  19. stdWrap.typolink.addQueryString = 1
  20. stdWrap.typolink.addQueryString.exclude = L,id,cHash,no_cache
  21. stdWrap.typolink.addQueryString.method = GET
  22. stdWrap.typolink.useCacheHash = 1
  23. stdWrap.typolink.no_cache = 0
  24. stdWrap.typolink.ATagParams = class="de" || class="gb" || class="si"
  25. }
  26. }
  27. }
  28.  
  29. [globalVar = GP:L =1]
  30. menus.langMenu.1.NO.stdWrap.override = English || Deutsch || Slovenš�ina
  31. menus.langMenu.1.NO.stdWrap.typolink.additionalParams = &L=1 || &L=0 || &L=2
  32. menus.langMenu.1.NO.stdWrap.typolink.ATagParams = class="gb" || class="de" || class="si"
  33. [globalVar = GP:L =2]
  34. menus.langMenu.1.NO.stdWrap.override = Slovenš�ina || Deutsch || English
  35. menus.langMenu.1.NO.stdWrap.typolink.additionalParams = &L=2 || &L=0 || &L=1
  36. menus.langMenu.1.NO.stdWrap.typolink.ATagParams = class="si" || class="de" || class="gb"
  37. [global]
  38.  
  39. menus.langMenu.1 {
  40. # Aktive Sprache
  41. ACT <.NO
  42. ACT.linkWrap =<li class="active">|</li>
  43. # NO + �bersetzung nicht vorhanden
  44. USERDEF1.linkWrap =<li class="notrans">|</li>
  45. # ACT + �bersetzung nicht vorhanden
  46. USERDEF2.linkWrap =<li class="active notrans">|</li>
  47. }

URL: http://madcity.at

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.