We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46580
    • 167 Posts
    Hello

    I'm searching a way to populate dynamically Form Tabs and Grid Columns e.g.:
    For Form Tabs I tried :
    [
    {"caption":"TV", "fields": [
    [[!getImageList? &tvname=`migx2` &tpl=`migx-json-tpl` &outputSeparator=`,`]]
    ]}
    ] 
    

    and
    [
    {"caption":"TV", "fields": [
    @EVAL return $modx->runSnippet('getImageList',array('tvname'=>'migx2', 'tpl'=>'migx-json-tpl', 'outputSeparator'=>','));
    ]}
    ]
    

    without success :-/
      MODX lover
      -
      Développeur MODX / Webdesign / Solutions web
      • 4172
      • 5,888 Posts
      Do your configuration for that TV with the MIGX - configurator - CMP

      Create a new configuration with the name, for example:

      mymigxconfig

      put that same name to the field 'unique MIGX ID'

      Add your columns to that configuration.

      put the name of that configuration into the TV - configuration into the field 'configs'

      The fields 'formtabs' and 'columns' schould be empty then.

      Create a file

      mymigxconfig.config.inc.php under the folder 'core/components/migx/configs/'

      The code of that file should be much the same like here:
      https://github.com/Bruno17/migxCustomColumns/blob/master/core/components/migxcustomcolumns/migxconfigs/migxcustomcolumnsgrid.config.inc.php

      Just change the tvname and the field - definitions.














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

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 46580
        • 167 Posts
        Thanks for your reply.
        Do you think it is possible to populate (programmatically add tv items) to a MIGX TV taking data from another MIGX TV?


        2 MIGX TV :
        MIGX TV1
        MIGX TV2

        New item "itv1" in MIGX TV1 -> add "itv1" as item data in a specific MIGX TV2 column ?

        MIGX TV1
        -----------
        Name | Param1
        -----------
        itv1 | itv1par1


        then populate automatically MIGX TV2 items (Name)each time item is added in MIGX TV1 :


        MIGX TV2
        ------------
        Name | Value
        -----------
        itv1 | itv2val2
          MODX lover
          -
          Développeur MODX / Webdesign / Solutions web
          • 8548
          • 104 Posts
          Quote from: Bruno17 at Feb 24, 2015, 12:00 AM
          Do your configuration for that TV with the MIGX - configurator - CMP

          Create a new configuration with the name, for example:

          mymigxconfig

          put that same name to the field 'unique MIGX ID'

          Add your columns to that configuration.

          put the name of that configuration into the TV - configuration into the field 'configs'

          The fields 'formtabs' and 'columns' schould be empty then.

          Create a file

          mymigxconfig.config.inc.php under the folder 'core/components/migx/configs/'

          The code of that file should be much the same like here:
          https://github.com/Bruno17/migxCustomColumns/blob/master/core/components/migxcustomcolumns/migxconfigs/migxcustomcolumnsgrid.config.inc.php

          Just change the tvname and the field - definitions.

          Hey Bruno,

          this is what I'm trying to acheive with no success.

          I have this tv that the backend user can populate from MIGX that creat a listbox in some section of the site,
          And I'm trying to fetch that information to populate a checkbos list in an other MIGX for the backend user to use without having to recreate them first.
          I tried to understant what your wrote here but I think I don't have anought for me to understand.

          here's images of what I have done;

          in this first image, you see my 1st migx+tv that the backend user adds his categories for use on some part of the site.

          in this 2nd image, you seem my attemps on fetching the categories on a specific ressource id with this code (where you see the huh)
          [[!getImageList? &docid=`1` &tvname=`Portfolio_configuration` &tpl=`@CODE:[[+foliocatego]]||` ]]



          thanks you.
          Francis
            • 8548
            • 104 Posts
            Quote from: Egam at Nov 07, 2016, 09:03 PM


            Hey Bruno,

            this is what I'm trying to acheive with no success.

            I have this tv that the backend user can populate from MIGX that creat a listbox in some section of the site,
            And I'm trying to fetch that information to populate a checkbos list in an other MIGX for the backend user to use without having to recreate them first.
            I tried to understant what your wrote here but I think I don't have anought for me to understand.

            here's images of what I have done;

            in this first image, you see my 1st migx+tv that the backend user adds his categories for use on some part of the site.

            in this 2nd image, you seem my attemps on fetching the categories on a specific ressource id with this code (where you see the huh)
            [[!getImageList? &docid=`1` &tvname=`Portfolio_configuration` &tpl=`@CODE:[[+foliocatego]]||` ]]



            thanks you.
            Francis

            SOLUTION that I've found :
            in the Input Option Value field I've put
            @CHUNK list_categorie

            then I made the «list_categorie» chunk
            [[getImageList? &docid=`1` &tvname=`Portfolio_configuration` &tpl=`@CODE:[[+foliocatego]]||` ]]

            What was IMPORTANT here, and what i was doing wrong, the getImageList MUST be cached (I was calling it uncached at first).