We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Is there any practical limit to a MIGx TV? For example, I'm working with a three-level menu-type structure, to replace a chained select with a lot of hand-coded Javascript and hand-coded lists in chunks. The first level has four items, the second level has 2-6 items, and the third level has from 1 to 20 items.

    The second level and certainly the third level are added to frequently, which is why I'm using a MIGx TV. I could use four separate TVs, one for each top-level item, since that probably won't change very often, if at all.

    Or would I be better off setting up a MIGXdb TV, using custom tables for at least the second and third level? Can I nest MIGXdb TVs, as the third level definitely needs to be nested inside the second level.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 4172
      • 5,888 Posts
      while I think it should work with nested MIGX-TVs, I haven't a good feeling to have all records stored as one json-string.

      managed to get it work with three nested MIGXdb-TVs.

      new package: productdocuments

      schema:
      <?xml version="1.0" encoding="UTF-8"?>
      <model package="productdocuments" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM">
      	<object class="pdFamily" table="pd_families" extends="xPDOSimpleObject">
      		<field key="name" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
      
              <composite alias="Products" class="pdProduct" local="id" foreign="family_id" cardinality="many" owner="local" />
      	</object>
      
      	<object class="pdProduct" table="pd_products" extends="xPDOSimpleObject">
      		<field key="name" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
              <field key="family_id" dbtype="int" precision="10" phptype="integer" null="false" default="0"  index="index" />
      
              <aggregate alias="Family" class="pdFamily" local="family_id" foreign="id" cardinality="one" owner="foreign" />
              <composite alias="Documents" class="pdDocument" local="id" foreign="product_id" cardinality="many" owner="local" />
             
      	</object>
          
      	<object class="pdDocument" table="pd_documents" extends="xPDOSimpleObject">
      		<field key="name" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
              <field key="file" dbtype="varchar" precision="255" phptype="string" null="false" default="" index="index" />
              <field key="product_id" dbtype="int" precision="10" phptype="integer" null="false" default="0"  index="index" />
      
              <aggregate alias="Product" class="pdProduct" local="product_id" foreign="id" cardinality="one" owner="foreign" />
             
      	</object>    
          
      </model>
      


      three MIGXdb - TVs

      name: pdfamilies
      configs: pdfamilies
      only this one is assigned to your template

      name: pdproducts
      configs: pdproducts

      name: pddocuments
      configs: pddocuments

      import this MIGX - configs:
      pdfamilies:
      {"formtabs":"[{\"MIGX_id\":\"1\",\"caption\":\"Family\",\"fields\":[{\"MIGX_id\":\"1\",\"field\":\"name\",\"caption\":\"Name\",\"inputTV\":\"\",\"inputTVtype\":\"\",\"configs\":\"\",\"sourceFrom\":\"config\",\"sources\":\"\",\"inputOptionValues\":\"\",\"default\":\"\"}]},{\"MIGX_id\":\"2\",\"caption\":\"Products\",\"fields\":\"[{\\\"MIGX_id\\\":\\\"1\\\",\\\"field\\\":\\\"products\\\",\\\"caption\\\":\\\"Products\\\",\\\"inputTV\\\":\\\"pdproducts\\\",\\\"inputTVtype\\\":\\\"\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"}]\"}]","contextmenus":"update||remove","actionbuttons":"addItem","columnbuttons":"","filters":"","extended":{"migx_add":"Add Family","formcaption":"Family","win_id":"pdfamilies","multiple_formtabs":"","extrahandlers":"","packageName":"productdocuments","classname":"pdFamily","task":"","getlistsort":"","getlistsortdir":"","use_custom_prefix":"0","prefix":"","grid":"","gridload_mode":"1","check_resid":"0","check_resid_TV":"","join_alias":"","getlistwhere":"","joins":"","cmpmaincaption":"","cmptabcaption":"","cmptabdescription":"","cmptabcontroller":""},"columns":"[{\"MIGX_id\":\"1\",\"header\":\"Name\",\"dataIndex\":\"name\",\"width\":\"20\",\"sortable\":\"false\",\"show_in_grid\":\"1\",\"renderer\":\"\",\"clickaction\":\"\",\"selectorconfig\":\"\",\"renderoptions\":\"\"},{\"MIGX_id\":\"2\",\"header\":\"ID\",\"dataIndex\":\"id\",\"width\":\"\",\"sortable\":\"false\",\"show_in_grid\":\"0\",\"renderer\":\"\",\"clickaction\":\"\",\"selectorconfig\":\"\",\"renderoptions\":\"\"}]"}
      


      pdproducts:
      {"formtabs":"[{\"MIGX_id\":\"1\",\"caption\":\"Product\",\"fields\":[{\"MIGX_id\":\"1\",\"field\":\"name\",\"caption\":\"Name\",\"inputTV\":\"\",\"inputTVtype\":\"\",\"configs\":\"\",\"sourceFrom\":\"config\",\"sources\":\"\",\"inputOptionValues\":\"\",\"default\":\"\"}]},{\"MIGX_id\":\"2\",\"caption\":\"Documents\",\"fields\":\"[{\\\"MIGX_id\\\":\\\"1\\\",\\\"field\\\":\\\"documents\\\",\\\"caption\\\":\\\"Documents\\\",\\\"inputTV\\\":\\\"pddocuments\\\",\\\"inputTVtype\\\":\\\"\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"}]\"}]","contextmenus":"update||remove","actionbuttons":"addItem","columnbuttons":"","filters":"","extended":{"migx_add":"Add Product","formcaption":"Product","win_id":"pdproducts","multiple_formtabs":"","extrahandlers":"","packageName":"productdocuments","classname":"pdProduct","task":"","getlistsort":"","getlistsortdir":"","use_custom_prefix":"0","prefix":"","grid":"","gridload_mode":"2","check_resid":"1","check_resid_TV":"","join_alias":"Family","getlistwhere":"","joins":"","cmpmaincaption":"","cmptabcaption":"","cmptabdescription":"","cmptabcontroller":""},"columns":"[{\"MIGX_id\":\"1\",\"header\":\"Name\",\"dataIndex\":\"name\",\"width\":\"20\",\"sortable\":\"false\",\"show_in_grid\":\"1\",\"renderer\":\"\",\"clickaction\":\"\",\"selectorconfig\":\"\",\"renderoptions\":\"\"},{\"MIGX_id\":\"2\",\"header\":\"ID\",\"dataIndex\":\"id\",\"width\":\"\",\"sortable\":\"false\",\"show_in_grid\":\"0\",\"renderer\":\"\",\"clickaction\":\"\",\"selectorconfig\":\"\",\"renderoptions\":\"\"}]"}
      


      pddocuments:
      {"formtabs":"[{\"MIGX_id\":\"1\",\"caption\":\"Document\",\"fields\":\"[{\\\"MIGX_id\\\":\\\"1\\\",\\\"field\\\":\\\"name\\\",\\\"caption\\\":\\\"Name\\\",\\\"inputTV\\\":\\\"\\\",\\\"inputTVtype\\\":\\\"\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"},{\\\"MIGX_id\\\":\\\"2\\\",\\\"field\\\":\\\"file\\\",\\\"caption\\\":\\\"File\\\",\\\"inputTV\\\":\\\"\\\",\\\"inputTVtype\\\":\\\"file\\\",\\\"configs\\\":\\\"\\\",\\\"sourceFrom\\\":\\\"config\\\",\\\"sources\\\":\\\"\\\",\\\"inputOptionValues\\\":\\\"\\\",\\\"default\\\":\\\"\\\"}]\"}]","contextmenus":"update||remove","actionbuttons":"addItem","columnbuttons":"","filters":"","extended":{"migx_add":"Add Document","formcaption":"Document","win_id":"pddocuments","multiple_formtabs":"","extrahandlers":"","packageName":"productdocuments","classname":"pdDocument","task":"","getlistsort":"","getlistsortdir":"","use_custom_prefix":"0","prefix":"","grid":"","gridload_mode":"2","check_resid":"1","check_resid_TV":"","join_alias":"Product","getlistwhere":"","joins":"","cmpmaincaption":"","cmptabcaption":"","cmptabdescription":"","cmptabcontroller":""},"columns":"[{\"MIGX_id\":\"1\",\"header\":\"Name\",\"dataIndex\":\"name\",\"width\":\"20\",\"sortable\":\"false\",\"show_in_grid\":\"1\",\"renderer\":\"\",\"clickaction\":\"\",\"selectorconfig\":\"\",\"renderoptions\":\"\"},{\"MIGX_id\":\"2\",\"header\":\"ID\",\"dataIndex\":\"id\",\"width\":\"\",\"sortable\":\"false\",\"show_in_grid\":\"0\",\"renderer\":\"\",\"clickaction\":\"\",\"selectorconfig\":\"\",\"renderoptions\":\"\"}]"}
      

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
      • Oh, I have it working just fine. I was just wondering if anybody had run into any performance or other problems with such a beast. I seriously doubt it will ever approach 16Mb of data! If it starts causing problems, I can always convert it to a MIGXdb with custom tables.






          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org