[TYPO3] Globalvars

Bas van der Togt b.vandertogt at profinit.com
Tue Jul 25 20:37:14 CEST 2006


Thanks for your answer again Joey!
But i want to use the NO, RO, ACT and USERDEF statements in my menu.
That's not possible with this configuration right? Or do you know a 
solution for this?

This is my code now:

# Language
temp.Language = HMENU
temp.Language.special = language
temp.Language.special.value = 0,1
temp.Language.1 = GMENU
temp.Language.1.NO {
   imgParams = id="img-nl" onMouseover="showtext('Nederlands')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl.gif || 
fileadmin/templates/images/lang-en.gif
   5.width = 28
   5.height = 28
}

temp.Language.1.ACT < temp.Language.1.NO
temp.Language.1.ACT = 1
temp.Language.1.ACT {
   imgParams = id="img-nl" onMouseover="showtext('Nederlands')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl-o.gif || 
fileadmin/templates/images/lang-en-o.gif
   5.width = 28
   5.height = 28
}

temp.Language.1.RO < temp.Language.1.NO
temp.Language.1.RO = 1
temp.Language.1.RO {
   imgParams = id="img-nl" onMouseover="showtext('Nederlands')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl-o.gif || 
fileadmin/templates/images/lang-en-o.gif
   5.width = 28
   5.height = 28
}

temp.Language.1.USERDEF1 < temp.Language.1.NO
temp.Language.1.USERDEF1 = 1
temp.Language.1.USERDEF1 {
   noLink = 1
   imgParams = id="img-nl" onMouseover="showtext('Nederlands')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl-d.gif || 
fileadmin/templates/images/lang-en-d.gif
   5.width = 28
   5.height = 28
}

[globalString= IENV:HTTP_HOST = *wolfsstyle.com]
temp.Language = HMENU
temp.Language.special = language
temp.Language.special.value = 0,1
temp.Language.1 = GMENU
temp.Language.1.NO {
   imgParams = id="img-nl" onMouseover="showtext('Dutch')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl.gif || 
fileadmin/templates/images/lang-en.gif
   5.width = 28
   5.height = 28
}

temp.Language.1.ACT < temp.Language.1.NO
temp.Language.1.ACT = 1
temp.Language.1.ACT {
   imgParams = id="img-nl" onMouseover="showtext('Dutch')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl-o.gif || 
fileadmin/templates/images/lang-en-o.gif
   5.width = 28
   5.height = 28
}

temp.Language.1.RO < temp.Language.1.NO
temp.Language.1.RO = 1
temp.Language.1.RO {
   imgParams = id="img-nl" onMouseover="showtext('Dutch')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl-o.gif || 
fileadmin/templates/images/lang-en-o.gif
   5.width = 28
   5.height = 28
}

temp.Language.1.USERDEF1 < temp.Language.1.NO
temp.Language.1.USERDEF1 = 1
temp.Language.1.USERDEF1 {
   noLink = 1
   imgParams = id="img-nl" onMouseover="showtext('Dutch')" 
onMouseout="hidetext()" || id="img-uk" onMouseover="showtext('English')" 
onMouseout="hidetext()"
   XY = 28,28
   5 = IMAGE
   5.file = fileadmin/templates/images/lang-nl-d.gif || 
fileadmin/templates/images/lang-en-d.gif
   5.width = 28
   5.height = 28
}
[global]

cheers,
Bas

JoH schreef:
>>>>This is the setup of my topMenu:
>>>>It's very big, i'm sory!
>>>
>>>As far as I can see, there is no L Parameter available to trigger
>>>your different menu setups.
>>>So the default site just shows the default menu.
>>>Calling the .com version, clicking on NL and then on EN gives you the
>>>desired behaviour though.
>>>Since the default language uid for .com is 1 anyway, you wouldn't
>>>need the L parameter as long as there is no user clicking on a
>>>language button. Solution:
>>>1.) Switch the condition for the menus (and the other stuff that is
>>>not translated) to globalString too.
>>>2.) Change the language menu so that it doesn't add the L parameter
>>>to the current URL but sends the user to the correct URL for this
>>>language. So instead of
>>>
>>>current.url/?L=1
>>>or
>>>current.url/?L=0
>>>
>>>you would get
>>>
>>>language1.url
>>>or
>>>language2.url
>>>
>>>At least this is the way we are doing it for
>>>www.xposign.com
>>>www.xposign.de
>>
>>Thank you very much JoH!
>>But there's one more question:
>>
>>How can i make my language menu domain sensitive?
>>So if i select the english version (from language menu) its going to
>>the .com domain and if i select the dutch verison the .nl domain like
>>on these websites:
> 
> 
> Well - just use default typolink, not a special=language menu.
> 
> This one is the original from www.xposign.com
> 
> temp.langmenu = COA
> temp.langmenu {
>     10 = TEXT
>     10 {
>         value = <img src="fileadmin/images/deutsch.gif" border=0>
>         wrap = <td valign="bottom">|</td>
>         typolink {
>             addQueryString = 1
>             parameter.dataWrap = http://www.xposign.de/{TSFE:id}.0.html
>         }
>     }
>     20 = TEXT
>     20 {
>         value = <img src="fileadmin/images/english.gif" border=0>
>         wrap = <td valign="bottom">|</td>
>         typolink {
>             addQueryString = 1
>             parameter.dataWrap = http://www.xposign.com/{TSFE:id}.0.html
>         }
>     }
> }
> 
> It will work with simulateStaticDocuments.
> Maybe you have to modify it to your needs or just switch your whole setup to 
> simulateStatic.
> 
> Joey
> 



More information about the TYPO3-english mailing list