Language menu via TypoScript


lib.languageMenu = HMENU
lib.languageMenu{
 special = language
 special.value = 0,1,2,3
 special.normalWhenNoLanguage = 0
 wrap =<ul> | </ul>
 1 = TMENU
 1
 {
   wrap = <div><h1>Language</h1></div><ul>|</ul>
   NO = 1
   NO
   {
    linkWrap = <li class="first"> | </li> |*| <li> | </li> 
                     |*| <li class="last"> | </li>
    stdWrap.override = HI || DE || EN || RU
    ATagTitle = Indian || German || English || Russia
    doNotLinkIt = 1
    stdWrap.typolink.parameter.data = page:uid
    stdWrap.typolink.additionalParams = &L=0 || &L=1 || &L=2 || &L=3
    stdWrap.typolink.addQueryString = 1
    stdWrap.typolink.addQueryString.exclude = id,cHash,no_cache
    stdWrap.typolink.addQueryString.method = GET
    stdWrap.typolink.useCacheHash = 0
    stdWrap.typolink.no_cache = 0
   }
   ACT = 1
   ACT < .NO
   ACT.ATagParams = class = "active"
   ACT.doNotLinkIt = 1
   ACT.linkWrap = <li class="first active"> | </li> |*|
    <li class="active"> | </li> |*| <li class="last active"> | </li>
 }
}

If you have any query then feel free to contact me at Jainish Senjaliya

Advertisements

2 thoughts on “Language menu via TypoScript

  1. Pingback: tt_news detail page not working after switch frontend language. error shows “no news_id given” - HTML CODE

  2. How to add active class when click on icon of other language? I have added same script but it shows only default active on default language icon.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s