Page 1 of 1

Redirecting to DEFAULT_LANG if no content

Posted: Wed Oct 01, 2008 2:21 pm
by simon_a
Hey!

I have the latest version of MLE installed.

I followed your instructions here to redirect to the DEFAULT_LANG if the page content does not exist for a language:
http://forum.cmsmadesimple.org/index.ph ... l#msg99796

My default language is en_US. If French content for a page is empty, I want redirect to the DEFAULT_LANG (en_US) page /index.php?page=our-services&hl=en_US page.

The problem: the redirect does not work. The URL does not change to en_US, but remains as /index.php?page=our-services&hl=fr_FR.

On the French page, the en_US content is displayed, but I do not want that. I want the browser to redirect to the /index.php?page=our-services&hl=en_US page.

Any ideas on how to do that?

Thank you!
Simon

Re: Redirecting to DEFAULT_LANG if no content

Posted: Wed Oct 01, 2008 9:21 pm
by alby
simon_a wrote: I followed your instructions here to redirect to the DEFAULT_LANG if the page content does not exist for a language:
http://forum.cmsmadesimple.org/index.ph ... l#msg99796
View this topic, but I have verify a bug that stop UDT to work well ...

Alby

Re: Redirecting to DEFAULT_LANG if no content

Posted: Thu Oct 02, 2008 8:31 am
by simon_a
Thanks Alby, yes it looks like that's the bug. The $maincontent is not empty, and therefore the redirect doesn't work.

Simon

Re: Redirecting to DEFAULT_LANG if no content

Posted: Thu Oct 02, 2008 9:55 am
by alby
simon_a wrote: Thanks Alby, yes it looks like that's the bug. The $maincontent is not empty, and therefore the redirect doesn't work.
Infact, I find a bug for default_lang_fallback disabled
In SVN there is also:

- switch display langs ready ONLY (if menu text exist for that lang)
- add nocurrent param (no display current lang in switch)

Alby