Hi!
Config :
CMSMS MLE : 1.8.2 toliara
CGCalendar : 1.5.5
I'm making a multilingual site. I have to use images as title, so i needed a solution to change the image depending on the language.
I've found that solution that works great ...
... So it works great... except on pages where the CGCalendar is displayed.
On those pages, the lang param on images is replaced by : Array =>
So i think, there is a conflict between {$lang} and CGcalendar, but i don(t know how to fix it...
Thanks!
[SOLVED] Conflict between {$lang} and CGCalendar?
[SOLVED] Conflict between {$lang} and CGCalendar?
Last edited by nicks on Fri Oct 01, 2010 9:08 am, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Conflict between {$lang} and CGCalendar?
We do not support CMSMS MLE.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Conflict between {$lang} and CGCalendar?
Ok... I suppose that means "don't waste your time"...
Re: Conflict between {$lang} and CGCalendar?
Please post your report to the MLE section. Perhaps there will be someone, who will be able to help you.
Re: Conflict between {$lang} and CGCalendar?
I have tested {$lang} on page before {CGCalendar} and in calendar template - everything looks ok. What is your template ?
In case it really interferes you could save {$lang} value to temp variable and use it inside CGCalendar.
In case it really interferes you could save {$lang} value to temp variable and use it inside CGCalendar.
Code: Select all
{assign var='cgc_lang' value=$lang}
{cms_module module="CGCalendar" display='calendar'}
{assign var='lang' value=$cgc_lang}
Re: Conflict between {$lang} and CGCalendar?
Hi! Thanks for the replies. Actually, "Jean le Chauve" on the french forum, solved my problem by creating an UDT.
The condition is that URL Rewrite is turned on and makes something like that : "mydomain.com/en_USA/mypage", "mydomain.com/fr_FR/mypage" etc...
So, this is the UDT content :
Then in my template (or page) i call the udt and the image like this :
And that's all!
You can follow the entire discussion (in french) here :
http://www.cmsmadesimple.fr/forum/viewtopic.php?id=2951
The condition is that URL Rewrite is turned on and makes something like that : "mydomain.com/en_USA/mypage", "mydomain.com/fr_FR/mypage" etc...
So, this is the UDT content :
Code: Select all
$pageURL = 'http';
$lang = '';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
if (strpos($pageURL, '/fr_FR/') > 0) $lang = 'fr_FR';
elseif (strpos($pageURL, '/en_USA/') > 0) $lang = 'en_US';
// Add other languages here...
global $gCms;
$smarty = &$gCms->GetSmarty();
$smarty->assign('suffixeImage', $lang);
Code: Select all
{myUDT}<img src="images/imagename-{$suffixeImage}.jpg" />
You can follow the entire discussion (in french) here :
http://www.cmsmadesimple.fr/forum/viewtopic.php?id=2951