Quote from: Fishcake at Oct 12, 2010, 01:02 PM
Quote from: arto at Oct 12, 2010, 12:22 PM
Hey, thanks a lot for this, what a great solution! I got everything working properly, but I just noticed that if I go to a page that doesn’t exist in another language and then switch the language, I will end up in the container page (e.g. Finnish/English, depending on the language) instead of the actual home page of that language. Any ideas how to fix this? I’d really appreciate any advice.
I think the easiest solution is to either make the language container itself the homepage or otherwise use a simple snippet to redirect to your homepage.
For example I did this recently and had a template for language container, within that template was simply a call to FirstChildredirect http://modxcms.com/extras/package/151
Beautiful, thanks! This works just like I wanted. I was sure there would be a solution hidden somewhere within the language changer code itself, but I guess this is the way to go. Oh, and I can’t really make the language container the homepage, as it would then show in the main menu as English instead of Home... unless I’m missing something. But anyway, everything is great now.
By the way, in case anyone is wondering how to make the containers not to show in breadcrumbs, you can just ignore the ids you want to exclude:
[[Breadcrumbs? &ignoreIds=`49,55,77`]]