We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51725
    • 7 Posts
    I use ModX Revo 2.4.2-pl and MIGX 2.9.6-pl.
    I have package "store" in my MySQL DB. I store data in "storing" migxdb TV (configuration is set to "store") in some resources in tree %) like this:
    Main item 1(has tv "storing" with migx items)

    • Subitem 1(has tv "storing" with migx items)
    • Subitem 2(has tv "storing" with migx items)
    • Subitem 3(has tv "storing" with migx items)

    Questions:

    1) How to output all "storing" items on Custom Manager Page for editing?
    2) How sort "storing" items on Custom Manager Page with DB-Filters?

    This question has been answered by Bruno17. See the first response.

      • 4172
      • 5,888 Posts
      can you post an export of your configuration, what you have now.
      and your xpdo-schema, please.
      much easier to help, with that infos.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 51725
        • 7 Posts
        {
          "formtabs":[
            {
              "MIGX_id":1,
              "caption":"Main parameters",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":9,
                  "field":"image",
                  "caption":"Image",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"image",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"tv",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":1
                },
                {
                  "MIGX_id":1,
                  "field":"pagetitle",
                  "caption":"Name",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":2
                },
                {
                  "MIGX_id":20,
                  "field":"weight",
                  "caption":"Weight in kg",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"weight",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":3
                },
                {
                  "MIGX_id":2,
                  "field":"introtext",
                  "caption":"Description",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"textarea",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":4
                },
                {
                  "MIGX_id":21,
                  "field":"haserror",
                  "caption":"Has this good an error?",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"checkbox",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"\u0414\u0430==1",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":5
                },
                {
                  "MIGX_id":7,
                  "field":"alias",
                  "caption":"Alias",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":6
                },
                {
                  "MIGX_id":8,
                  "field":"template",
                  "caption":"Template",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":2,
                  "useDefaultIfEmpty":1,
                  "pos":7
                }
              ],
              "pos":1
            },
            {
              "MIGX_id":3,
              "caption":"Prices",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":3,
                  "field":"prices",
                  "caption":"Prices",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"prices",
                  "inputTVtype":"",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":1
                }
              ],
              "pos":2
            },
            {
              "MIGX_id":5,
              "caption":"Description",
              "print_before_tabs":"0",
              "fields":[
                {
                  "MIGX_id":10,
                  "field":"content",
                  "caption":"Full description",
                  "description":"",
                  "description_is_code":"0",
                  "inputTV":"",
                  "inputTVtype":"richtext",
                  "validation":"",
                  "configs":"",
                  "restrictive_condition":"",
                  "display":"",
                  "sourceFrom":"config",
                  "sources":"",
                  "inputOptionValues":"",
                  "default":"",
                  "useDefaultIfEmpty":"0",
                  "pos":1
                }
              ],
              "pos":3
            }
          ],
          "contextmenus":"update||duplicate||publish||unpublish||recall_remove_delete||remove",
          "actionbuttons":"addItem||bulk||toggletrash",
          "columnbuttons":"",
          "filters":[
            {
              "MIGX_id":1,
              "name":"search",
              "label":"Search",
              "emptytext":"type something for search",
              "type":"textbox",
              "getlistwhere":{
                "pagetitle:LIKE":"%[[+search]]%"
              },
              "getcomboprocessor":"",
              "combotextfield":"",
              "comboidfield":"",
              "combowhere":"",
              "comboclassname":"",
              "combopackagename":"",
              "combo_use_custom_prefix":"0",
              "comboprefix":"",
              "combojoins":"",
              "comboparent":"",
              "default":""
            },
            {
              "MIGX_id":2,
              "name":"goodswitherrors",
              "label":"Goods with errors",
              "emptytext":"type 1 to see goods with errors",
              "type":"textbox",
              "getlistwhere":{
                "haserror":"[[+goodswitherrors]]"
              },
              "getcomboprocessor":"",
              "combotextfield":"",
              "comboidfield":"",
              "combowhere":"",
              "comboclassname":"",
              "combopackagename":"",
              "combo_use_custom_prefix":"0",
              "comboprefix":"",
              "combojoins":"",
              "comboparent":"",
              "default":""
            }
          ],
          "extended":{
            "migx_add":"Store",
            "disable_add_item":"",
            "add_items_directly":"",
            "formcaption":"[[+pagetitle]]",
            "update_win_title":"Store",
            "win_id":"",
            "maxRecords":"",
            "addNewItemAt":"bottom",
            "multiple_formtabs":"",
            "multiple_formtabs_label":"",
            "multiple_formtabs_field":"",
            "multiple_formtabs_optionstext":"",
            "multiple_formtabs_optionsvalue":"",
            "actionbuttonsperrow":5,
            "winbuttonslist":"",
            "extrahandlers":"",
            "filtersperrow":4,
            "packageName":"store",
            "classname":"StoreContent",
            "task":"",
            "getlistsort":"id",
            "getlistsortdir":"desc",
            "sortconfig":"",
            "gridpagesize":100,
            "use_custom_prefix":"0",
            "prefix":"",
            "grid":"",
            "gridload_mode":2,
            "check_resid":1,
            "check_resid_TV":"",
            "join_alias":"",
            "has_jointable":"yes",
            "getlistwhere":"",
            "joins":"",
            "hooksnippets":"",
            "cmpmaincaption":"store",
            "cmptabcaption":"All goods",
            "cmptabdescription":"Manage goods",
            "cmptabcontroller":"",
            "winbuttons":"",
            "onsubmitsuccess":"",
            "submitparams":""
          },
          "columns":[
            {
              "MIGX_id":1,
              "header":"ID",
              "dataIndex":"id",
              "width":100,
              "sortable":true,
              "show_in_grid":1,
              "customrenderer":"",
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            },
            {
              "MIGX_id":5,
              "header":"Image",
              "dataIndex":"image",
              "width":150,
              "sortable":"false",
              "show_in_grid":1,
              "customrenderer":"",
              "renderer":"this.renderImage",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            },
            {
              "MIGX_id":2,
              "header":"Name",
              "dataIndex":"pagetitle",
              "width":200,
              "sortable":true,
              "show_in_grid":1,
              "customrenderer":"",
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":"this.textEditor"
            },
            {
              "MIGX_id":4,
              "header":"Alias",
              "dataIndex":"alias",
              "width":200,
              "sortable":"false",
              "show_in_grid":1,
              "customrenderer":"",
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            },
            {
              "MIGX_id":3,
              "header":"Description",
              "dataIndex":"introtext",
              "width":200,
              "sortable":"false",
              "show_in_grid":1,
              "customrenderer":"",
              "renderer":"",
              "clickaction":"",
              "selectorconfig":"",
              "renderchunktpl":"",
              "renderoptions":"",
              "editor":""
            }
          ]
        }



        Here it is. I made CMP on adress "?a=index&namespace=migx&configs=store". This page looks like migxdb tv on pages like "Main item 1", but it outputs all items from all "storing" and DB-Filters are working. This is exactly what I needed.

        But now I've got a problem with images in grid. They are not being rendered, because of image source. MIGX uses source with id 2 in tvs of resources, but on CMP it uses source with id 1.

        Here is code of image in migx grid on my CMP:
        <img src="/connectors/system/phpthumb.php?h=60&src=misc/Some image name.png&source=1" alt="">
        • discuss.answer
          • 4172
          • 5,888 Posts
          try

                    "inputTV":"",
                    "inputTVtype":"image",
                    "sourceFrom":"config",
          


          and add a mediasource for 'mgr' and for 'web' to the field-configuration [ed. note: Bruno17 last edited this post 10 years, 8 months ago.]
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 51725
            • 7 Posts
            Thamks! This (see in attachment) configuration works. [ed. note: chrncr last edited this post 10 years, 8 months ago.]