-
☆ A M B ☆
- 24,524 Posts
Since it uses pdoResources in the mml_baseTemplate (or whatever templates you are using) you would need to add the &context=`...` property. I would imagine that you would also need to use appropriate context settings instead or in addition to system settings.
I gave this a go and it doesn't seem to be working for me either. I sent a tweet to Bruno about it... maybe we're missing something simple.
It appears to be changing the cultureKey correctly depending on the URL on the second context... it's just not showing the assigned chunk.
I put some tags under the mmlCache call on the template in the second context.
[[!mmlCache?
&element=`pdoResources`
&parents=`0`
&resources=`[[*id]]`
&tpl=`lsEnrolPage`
&includeContent=`1`
&includeTVs=`[[mmlGetTemplateTVs]]`
&prepareTVs=`1`
&processTVs=`1`
&tvPrefix=``
&loadModels=`migxmultilang`
&prepareSnippet = `mmlTranslatePdoToolsRow`
]]
[[!++cultureKey]]<br>
[[!++site_url]]<br>
[[!++original_cultureKey]]<br>
[[!++original_site_url]]
If I type the second context URL into my browser with the language extension it shows the cultureKey is changing.
e.g.
http://www.seconddomain.com/en/
gives the output:
en
http://www.seconddomain.com/en/
en
http://www.seconddomain.com/
and typing in:
http://www.seconddomain.com/zh/
gives the output:
zh
http://www.seconddomain.com/zh/
en
http://www.seconddomain.com/
Removing the entire &includeTVs property allows the chunk to be displayed (instead of a blank page) but of course no TV values come through.
[ed. note: muzzstick last edited this post 11 years, 8 months ago.]
Anyone able to get this working with a second context? If so, how?
Could I perhaps install Lingua in addition to Migxmultilang and use that one on the second context?
I have migxMultiLang working on multiple contexts
I'm using the xrouting-plugin to switch to the contexts
Hi Bruno,
I've tried the xrouting-plugin, gatewaymanager and copying the modx index.php into a separate directory and initialising the second context.
They all work in terms of routing between the contexts if not using migxmultilang in the template.
Is there a way of working out why it's failing? A migx log or something like that?
Thanks
do you get something, when you add to the mml_cache - snippet call
&return=`sql`
you can also try to disable the
&tpl - property
do you get an array-output then?
what is your mml_cache - call currently?