Quote from: Bruno17 at Mar 04, 2015, 02:10 AMAh, well this is my first time using MIGX (and MML and pdoTools too!) A steep learning curve but so worth it.
You can add additional TVs with the Formmanager in the migxMultiLang - CMP
You can duplicate the default (example)- configuration and add tabs and fields for TVs to the form, just like you would do with any other MIGX-configuration.
So to clarify:
- 1. I duplicate the example configuration using the Duplicate button in the MML Form Manager
- 2. On the new configuration I click the Edit raw button and see something like this:
[ { "MIGX_id":1, "caption":"Document", "print_before_tabs":"0", "fields":[ { "MIGX_id":1, "field":"mml_pagetitle", "caption":"Pagetitle", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"", "configs":"", "sourceFrom":"config", "sources":"[]", "inputOptionValues":"", "default":"" }, { "MIGX_id":2, "field":"mml_longtitle", "caption":"Longtitle", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"", "configs":"", "sourceFrom":"config", "sources":"[]", "inputOptionValues":"", "default":"" }, { "MIGX_id":6, "field":"mml_menutitle", "caption":"Menutitle", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"", "validation":"", "configs":"", "sourceFrom":"config", "sources":"[]", "inputOptionValues":"", "default":"" }, { "MIGX_id":5, "field":"mml_introtext", "caption":"Summary (introtext)", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"textarea", "configs":"", "sourceFrom":"config", "sources":"[]", "inputOptionValues":"", "default":"" }, { "MIGX_id":3, "field":"mml_content", "caption":"Content", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"richtext", "configs":"", "sourceFrom":"config", "sources":"[]", "inputOptionValues":"", "default":"" } ] } ]
- 3. To the end of that json file I add something like:
{ "MIGX_id":7, "field":"mml_secondaryContent", "caption":"Secondary Content", "description":"", "description_is_code":"0", "inputTV":"", "inputTVtype":"richtext", "configs":"", "sourceFrom":"config", "sources":"[]", "inputOptionValues":"", "default":"" }
Questions:
What happens to the original (example) configuration when I create the duplicate? Is it still used somehow and/or does it create a conflict with the new one?
Why not just edit the original configuration?
I have an existing TV I want to translate - do I add the name of that TV in "field" as it is, or does the "field" name need to begin with mml_?
Do I just choose a number for MIGXid field (I assume it needs to be unique)?
[[+mml_pagetitle]]
[[+pagetitle]]
In the formmanager, you can check
Hide default language from Translations - grid
and change the placeholders
[[+mml_pagetitle]]
and so on to
[[+pagetitle]]
[[+mml_pagetitle]]
[[+pagetitle]]
[[!mmlCache? &element=`pdoResources` &parents=`0` &resources=`[[*id]]` &tpl=`Accueil.casino.tpl` &includeTVs=`[[mmlGetTemplateTVs]]` &prepareTVs=`1` &processTVs=`1` &includeContent=`1` &tvPrefix=`` &loadModels=`migxmultilang` &prepareSnippet = `mmlTranslatePdoToolsRow` ]]
if you haven't allready created a copy of your formtabs-configuration then duplicate the default configuration
Add the field with the tvname to the tab or create a new tab and add it there.
Select the template(s), where you want to use that configuration or set is as the default one.
Save it and you should be done.