Page 1 of 1

[SOLVED] Link a flag to an external site / URL

Posted: Thu Dec 03, 2009 7:57 pm
by jswags
Hello,

I'd like to add two additional flags USA and China to my current MLE install. However these flags need to link to different external URL's, not internal language pages within the CMSMS install.

So the obvious place to start is the config_lang.php and add in the appropriate code for USA and Chinese flag images, alt text etc.

Is there a way I can set up an absolute URL for each flag within config_lang.php that will go to "http://www.google.com" for example? Or could I set up a re-direct?

The other obvious option is to just add the flag images and hard code the URL within my template but I'd prefer to keep it contained within one place for neatness.

I'm using Version 1.2.3 of CMSMS MLE
Thanks
Jason

Re: Link a flag to an external site / URL

Posted: Thu Dec 03, 2009 9:07 pm
by Dr.CSS
Doesn't seem to make much sense to use MLE and then have the lang flags go to something other than the internal cmsms pages...

You might as well just call the flag images and hard code the links...

Re: Link a flag to an external site / URL

Posted: Mon Dec 07, 2009 10:26 am
by jswags
Thanks for the replay and yep I see your point and that's my option 2  :)

I just wondered if it was possible because it's an MLE install already set up with five languages and adding two additional languages via the config_lang.php with a line of code to redirect would have been neat and simple - rather than updating multiple templates.

So if someone else needs to do this just add (using USA flag as an example):

Code: Select all

<a href="http://www.externalURL.com" target="_blank"><img src="/images/lang/en_US.png" alt="USA" width="18" height="12" /></a>
below your {lang} tag within each Template you may have.