We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    idx is the item-number (starting with 0) of the renderoptions

    $modx->migx->customconfigs


    is the array of the MIGX-configuration

    just put your processor with the same name as the MIGX-default-processor under

    core/components/{packagename}/processors/mgr/default/

    or if you have defined a processorspath under

    core/components/{packagename}/processors/mgr/{processorspath}/

    MIGX will first search under processorspath, then under default in your package.
    If nothing was found under the same folders in the MIGX-package
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 50593
      • 19 Posts
      Ok. I will try to implement this for k_hansen's example.
        • 50593
        • 19 Posts
        Ok, I've changed staff_members CMP. Now it looks like this:

        {
          "formtabs":[
            {
              "MIGX_id":6,
              "caption":"New Staff Member",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":13,
                  "field":"name",
                  "caption":"Staff Name",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":1
                },
                {
                  "MIGX_id":14,
                  "field":"staffcategory",
                  "caption":"Staff Categories",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"migxdb",
                  "validation":"",
                  "configs":"staff_categories",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":2
                }
              ],
              "pos":1
            }
          ],
          "contextmenus":"update||duplicate||publish||unpublish||remove",
          "actionbuttons":"addItem",
          "columnbuttons":"update||duplicate||publish||unpublish||remove",
          "filters":"",
          "extended":{
            "migx_add":"Add New Staff Member",
            "disable_add_item":"",
            "add_items_directly":"",
            "formcaption":"",
            "update_win_title":"",
            "win_id":"staff_members",
            "maxRecords":"",
            "addNewItemAt":"bottom",
            "multiple_formtabs":"",
            "multiple_formtabs_label":"",
            "multiple_formtabs_field":"",
            "multiple_formtabs_optionstext":"",
            "multiple_formtabs_optionsvalue":"",
            "actionbuttonsperrow":4,
            "winbuttonslist":"",
            "extrahandlers":"",
            "filtersperrow":4,
            "packageName":"staff",
            "classname":"StaffMember",
            "task":"",
            "getlistsort":"",
            "getlistsortdir":"",
            "sortconfig":"",
            "gridpagesize":"",
            "use_custom_prefix":"0",
            "prefix":"",
            "grid":"",
            "gridload_mode":2,
            "check_resid":1,
            "check_resid_TV":"",
            "join_alias":"",
            "has_jointable":"yes",
            "getlistwhere":"",
            "joins":"",
            "hooksnippets":"",
            "cmpmaincaption":"Staff Members",
            "cmptabcaption":"All Staff Members",
            "cmptabdescription":"",
            "cmptabcontroller":"",
            "winbuttons":"",
            "onsubmitsuccess":"",
            "submitparams":""
          },
          "columns":[
            {
              "MIGX_id":1,
              "header":"ID",
              "dataIndex":"id",
              "width":"",
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            },
            {
              "MIGX_id":2,
              "header":"Staff Name",
              "dataIndex":"name",
              "width":"",
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            }
          ]
        }


        and added staff_categories CMP

        {
          "formtabs":[
            {
              "MIGX_id":10,
              "caption":"Category",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":19,
                  "field":"category",
                  "caption":"Category",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":1
                }
              ],
              "pos":1
            }
          ],
          "contextmenus":"",
          "actionbuttons":"",
          "columnbuttons":"",
          "filters":"",
          "extended":{
            "migx_add":"",
            "disable_add_item":"",
            "add_items_directly":"",
            "formcaption":"",
            "update_win_title":"",
            "win_id":"",
            "maxRecords":"",
            "addNewItemAt":"bottom",
            "multiple_formtabs":"",
            "multiple_formtabs_label":"",
            "multiple_formtabs_field":"",
            "multiple_formtabs_optionstext":"",
            "multiple_formtabs_optionsvalue":"",
            "actionbuttonsperrow":4,
            "winbuttonslist":"",
            "extrahandlers":"",
            "filtersperrow":4,
            "packageName":"staff",
            "classname":"StaffCategory",
            "task":"",
            "getlistsort":"",
            "getlistsortdir":"",
            "sortconfig":"",
            "gridpagesize":"",
            "use_custom_prefix":"0",
            "prefix":"",
            "grid":"",
            "gridload_mode":1,
            "check_resid":1,
            "check_resid_TV":"",
            "join_alias":"",
            "has_jointable":"yes",
            "getlistwhere":"",
            "joins":"",
            "hooksnippets":"",
            "cmpmaincaption":"",
            "cmptabcaption":"",
            "cmptabdescription":"",
            "cmptabcontroller":"",
            "winbuttons":"",
            "onsubmitsuccess":"",
            "submitparams":""
          },
          "columns":[
            {
              "MIGX_id":1,
              "header":"ID",
              "dataIndex":"id",
              "width":"",
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            },
            {
              "MIGX_id":2,
              "header":"Category",
              "dataIndex":"category",
              "width":"",
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            },
            {
              "MIGX_id":3,
              "header":"Joined",
              "dataIndex":"joined",
              "width":"",
              "sortable":"false",
              "show_in_grid":1,
              "renderer":"this.renderSwitchStatusOptions",
              "clickaction":"switchOption",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":[
                {
                  "MIGX_id":1,
                  "name":"joined",
                  "use_as_fallback":"",
                  "value":1,
                  "clickaction":"",
                  "handler":"",
                  "image":"assets\/components\/migx\/style\/images\/cb_ticked.png"
                },
                {
                  "MIGX_id":2,
                  "name":"unjoined",
                  "use_as_fallback":"",
                  "value":"0",
                  "clickaction":"",
                  "handler":"",
                  "image":"assets\/components\/migx\/style\/images\/cb_empty.png"
                }
              ],
              "editor":""
            }
          ]
        }
        


        But now I can't even see Categories in the nested grid (but I can see them in the separate CMP). sad

        One more question: why does picture renderer zoom my checkboxes (and all other images too)? Should I set up phpthumb? Or, may be, some other extras?


        You can find a screenshot of my staff_categories CMP in the attachment. [ed. note: marshwiggle last edited this post 11 years, 4 months ago.]
          • 4172
          • 5,888 Posts

          One more question: why does picture renderer zoom my checkboxes (and all other images too)? Should I set up phpthumb? Or, may be, some other extras?

          what do you mean with that question?

          And in your StaffCategory - CMP, the checkbox-column is useless.
          It isn't connected to a parent-object there.

          Will check you other issue(s) later
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 50593
            • 19 Posts

            what do you mean with that question?

            All the custom images in the backend (including checkbox images) are scaled may be two times larger than their original size. I think, I have to set up phpthumb, though not sure.


            And in your StaffCategory - CMP, the checkbox-column is useless.
            It isn't connected to a parent-object there.

            I know that. For the moment I just want to show my categories in the nested grid.


            Will check you other issue(s) later

            Thank you!
              • 4172
              • 5,888 Posts

              All the custom images in the backend (including checkbox images) are scaled may be two times larger than their original size. I think, I have to set up phpthumb, though not sure.

              never have seen that. Do you have a screenshot?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 50593
                • 19 Posts
                Quote from: Bruno17 at Jun 13, 2015, 06:13 AM

                never have seen that. Do you have a screenshot?

                Sure. See the attachment.
                  • 50593
                  • 19 Posts
                  Now I understand: the nested grid loads only those rows from the database, that are connected to the parent object. That's why my nested staff_categories grid is empty.
                    • 50593
                    • 19 Posts
                    Yes! I've got it! smiley The problem was "Check Resource" parameter. I've set it to "no" and now I can see all the staff_categories as a nested grid.

                    This is the JSON of staff_categories CMP:
                    {
                      "formtabs":[
                        {
                          "MIGX_id":10,
                          "caption":"Category",
                          "print_before_tabs":"0",
                          "fields":[
                            {
                              "MIGX_id":19,
                              "field":"category",
                              "caption":"Category",
                              "description":"",
                              "description_is_code":"0",
                              "inputTV":"",
                              "inputTVtype":"",
                              "validation":"",
                              "configs":"",
                              "restrictive_condition":"",
                              "display":"",
                              "sourceFrom":"config",
                              "sources":"",
                              "inputOptionValues":"",
                              "default":"",
                              "useDefaultIfEmpty":"0",
                              "pos":1
                            }
                          ],
                          "pos":1
                        }
                      ],
                      "contextmenus":"update||duplicate||remove",
                      "actionbuttons":"addItem",
                      "columnbuttons":"update||remove",
                      "filters":"",
                      "extended":{
                        "migx_add":"",
                        "disable_add_item":"",
                        "add_items_directly":"",
                        "formcaption":"",
                        "update_win_title":"",
                        "win_id":"",
                        "maxRecords":"",
                        "addNewItemAt":"bottom",
                        "multiple_formtabs":"",
                        "multiple_formtabs_label":"",
                        "multiple_formtabs_field":"",
                        "multiple_formtabs_optionstext":"",
                        "multiple_formtabs_optionsvalue":"",
                        "actionbuttonsperrow":4,
                        "winbuttonslist":"",
                        "extrahandlers":"",
                        "filtersperrow":4,
                        "packageName":"staff",
                        "classname":"StaffCategory",
                        "task":"",
                        "getlistsort":"",
                        "getlistsortdir":"",
                        "sortconfig":"",
                        "gridpagesize":"",
                        "use_custom_prefix":"0",
                        "prefix":"",
                        "grid":"",
                        "gridload_mode":2,
                        "check_resid":"0",
                        "check_resid_TV":"",
                        "join_alias":"",
                        "has_jointable":"yes",
                        "getlistwhere":"",
                        "joins":"",
                        "hooksnippets":"",
                        "cmpmaincaption":"",
                        "cmptabcaption":"",
                        "cmptabdescription":"",
                        "cmptabcontroller":"",
                        "winbuttons":"",
                        "onsubmitsuccess":"",
                        "submitparams":""
                      },
                      "columns":[
                        {
                          "MIGX_id":1,
                          "header":"ID",
                          "dataIndex":"id",
                          "width":"",
                          "sortable":"false",
                          "show_in_grid":1,
                          "renderer":"",
                          "clickaction":"",
                          "selectorconfig":"",
                          "renderchunktpl":"",
                          "renderoptions":"",
                          "editor":""
                        },
                        {
                          "MIGX_id":2,
                          "header":"Category",
                          "dataIndex":"category",
                          "width":"",
                          "sortable":"false",
                          "show_in_grid":1,
                          "renderer":"",
                          "clickaction":"",
                          "selectorconfig":"",
                          "renderchunktpl":"",
                          "renderoptions":"",
                          "editor":""
                        },
                        {
                          "MIGX_id":3,
                          "header":"Joined",
                          "dataIndex":"joined",
                          "width":"",
                          "sortable":"false",
                          "show_in_grid":1,
                          "renderer":"this.renderSwitchStatusOptions",
                          "clickaction":"switchOption",
                          "selectorconfig":"",
                          "renderchunktpl":"",
                          "renderoptions":[
                            {
                              "MIGX_id":1,
                              "name":"joined",
                              "use_as_fallback":"",
                              "value":1,
                              "clickaction":"",
                              "handler":"",
                              "image":"assets\/components\/migx\/style\/images\/cb_ticked.png"
                            },
                            {
                              "MIGX_id":2,
                              "name":"unjoined",
                              "use_as_fallback":"",
                              "value":"0",
                              "clickaction":"",
                              "handler":"",
                              "image":"assets\/components\/migx\/style\/images\/cb_empty.png"
                            }
                          ],
                          "editor":""
                        }
                      ]
                    }


                    Still, I have no checkboxes in the "Join" field. sad
                      • 4172
                      • 5,888 Posts
                      in your nested grid, do you have StaffMemberCategories or StaffCategory as the classname?

                      It should be StaffCategory, because you want to list all Categories and you want to have a checkbox for each Category.

                      you also should have

                      "use_as_fallback":"1",

                      for the 'unjoined' - renderoption

                      Than the empty checkbox would allways be rendered, if the value of 'joined' is not 1.

                      what is your getlist.php - code currently?
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!