Somebody can help me with this?
I want to use something like this... (i like to read out language)
If language = NL then give this hyperlink
else = i want to show a english hyperlink
I have made this.. but.. it dont work
{if $lang == "nl_NL"}
{cms_selflink page='78' text='Terug naar het overzicht'}
{else}
{cms_selflink page='78' text='Back to overview'}
{/if}
Somebody can help me?
cheers!
If else?
Re: If else?
Hello,
I don't know Smarty, but can you dump $lang to see what is actually in it ?
Pierre
I don't know Smarty, but can you dump $lang to see what is actually in it ?
Pierre
Re: If else?
Where is $lang coming from? Does that even exist anywhere in that template?
Re: If else?
I want to readout the language from the multilingual CMS.. I dont know if $lang exists, isn't there a variable that hold this information? 

Re: If else?
if variable $lang exists
then try "eq" instead of "=="
then try "eq" instead of "=="
Re: If else?
I am sorry but I had escaped this topic.BoHendriks wrote: If language = NL then give this hyperlink
else = i want to show a english hyperlink
I have made this.. but.. it dont work
{if $lang == "nl_NL"}
{cms_selflink page='78' text='Terug naar het overzicht'}
{else}
{cms_selflink page='78' text='Back to overview'}
{/if}
Try with {$lang|print_r} for debug your variables.
$lang is a smarty variable and contain current locale lang
What is your version of MLE?
Have you apply modify to MLE?
Tag {lang} for langs switch works?
Alby
Last edited by alby on Sat Jan 05, 2008 10:41 am, edited 1 time in total.