Hi There,
I’ve only recently translated my website using the modxwiki. All works fine, but I do have a problem with my URL’s, which I now don’t find so friendly anymore.
Following up on the tutorial I have created a parent tree in which I have placed the two languages; as follows:
1 - Welcome [redirect to id=2]
2 - NL -> HOME
3,4,5 Content in NL
6 - EN -> HOME
6,7,8 content in EN
What happens now is that my URL structure uses the first ID in the URL as well
example: www.mysite.com/1/NL/content
I cant put ID 1 as no container, it always puts it back as one. Does anyone know a solution or bypass to this problem so that I only have the NL or EN behind my domainname, and not the 1.
Hope this makes sense for you all, many thanks in advance!
-
☆ A M B ☆
- 24,524 Posts
Why not have your site_start be the home page for whichever language you want to be the default?
When I use this method, I have as many top-level resources as I do languages, and use those for the main language menu. They have snippets to set the language choice cookie if I use one, and the FirstChildRedirect snippet. My site_start is the home page for the default language (it will be the first child of the top-level resource for the default language).
That avoids the awkwardness of having multiple levels and having to fiddle with the sub-menus; UltimateParent works fine as the startId point for each language’s main menu structure (actually, this exact situation is why I wrote the original UltimateParent snippet in the first place!).