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
    Finally it should be possible now with MIGX 2.4.0 beta3:
    https://github.com/Bruno17/MIGX/downloads

    with the new chunkrenderer.

    works like that.
    Create a new Column in the MIGX - configurator for yor MIGX-TV
    fieldname for example 'submigx'.
    in tab 'Renderer' - choose: renderChunk
    create just one Renderoptions in the grid below.
    Fill out the field 'name' for example with tplColumnSubmigx

    Save it.

    Create a chunk 'tplColumnSubmigx'

    with something like that:

    [[getImageList? &value=`[[+yourSubMIGXfieldname]]` &tpl=`yourRowchunk`]]


    MIGX should now render your MIGX-call into each Row of your MIGX-grid.

    Lots of new possibilities with that feature!
    Its working on my Test-Environment for MIGX and MIGXdb.








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

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 41480
      • 8 Posts
      Sorry for the late reply. I was not successful in getting it to work. I don't know the inner workings of Migx, so even though I got great advice that pointed me in the right direction, I couldn't find anything that gave me step by step directions on how to execute it.

      Luckily, the client ended up simplifying the page anyway, so I was able to use Migx in the normal way I do.

      I am happy to hear about the new feature though! Can't wait. smiley
        • 40045
        • 534 Posts
        That seems like a great feature @Bruno,

        I have never worked with the migx configurator (always config the migx tvs with json like "back in the days" =D...), I went through the setup process an see the CMP but I never understood how to use it...so an extended rtfm on this would help I think. When I go to the CMP (with actually 4 migxTVs set up, 2 of them actually inside another migxTV, so they are subMIGX...) I don't see anything there...don't know if that's the idea or if I get it totally wrong. What purpose has the CMP to manage "normal" migxTVs?
          • 4172
          • 5,888 Posts
          you don't need to fill the formtabs and columns - json in the TV-form, but the field 'configurations' with the name of a MIGX-configuration.

          then you can add your tabs and fields + columns in the configuration.

          you can move the tabs,fields,columns by dragging them (since this are MIGX-TV-fields itself)
          you can add new fields and remove fields.
          and you have additinal possibilities what you can do with columns.
          For example choose renderer (like the chunkrenderer) for them and more.

          For fields, for example listbox-fields you can add inputoptions and default-values.
          You could do all that with the json, too.
          But at some point it can get a bit complicated and be source of issues.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 40045
            • 534 Posts
            I just have to refactor a site and gave the MIGX-CMP a try (I use the 2.4.0beta3 from github with revo 2.2.4pl/traditional), I set up all the migx grid TVs and the MIGX TV itself (a "normal" migx TV type, not migxdb, I also tried this in my desperation, but it didn't help...), but this time with no JSON configuration data inside the input options tab because I wanted to configure it via CMP. I also assigned the migx tv to the desired template (only this one, and not the TVs that are used for the migx grid...like I always did when configuring the migx TV directly via JSON)

            Then I went to the configuration CMP (under components), clicked the "MIGX" tab and added a new configuration.

            Under settings I did the following:
            - Gave it a name
            - Replaced the "Add Item" text
            - "Form Caption" i left blank
            - entered a lowercase, one-word "Unique MIGX-ID"

            Then i went to the Formtabs section (next tab)
            - I added two Tabs with the corresponding Captions, TVs, fieldnames as shown in the screenshots below





            I didn't enter anything in the "configs" field inside the field grid, and I also didn't touch the "Mediasources" or "Input Options" tabs.

            back in the MIGX configuration editor I also didn't touch the multi-selectbox "Multiple Formtabs", so this is empty too.

            Then I advanced to the Columns Tab and entered some simple columns (just to try out, not finished...) like this:



            all the other tabs in the MIGX configuration editor overlay I didn't touch. Finished / Saved and went back to the migx TV in the elements tab and entered the unique MIGX ID name I gave it before under Input Options > configurations and then saved the TV.

            Went into a resource to see if this worked. But sadly it just didn't. The MIGX grid shows up under TVs, but just with a default "Title" column (don't know where this is coming from) and when I try to add an item it just shows a "Default" tab with a text TV "Title" (which as said before, I didn't configure anywhere with this Caption [mine was german = Titel], so I don't know where this is coming from^^...) but none of my settings entered in the MIGX CMP are showing up...

            For the moment it seems as I'm just not skilled enough to use this nice feature =/...*lookingatthefloorandgoingbacktooldschoolJSONconfigurationdirectlyintheTV*

            any idea what I did wrong there? [ed. note: exside last edited this post 13 years, 9 months ago.]
              • 4172
              • 5,888 Posts
              use the name, not the unique-migx-id of the configuration in configs of your migx-TV
              Normally I use the same for name and unique-migx-id [ed. note: Bruno17 last edited this post 13 years, 9 months ago.]
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 39465
                • 14 Posts
                This is great feature smiley Exactly what i needed.

                For the ones using old style JSON in the fields , you can use it like this:

                {"field":"institutions","caption":"Institutions","inputTV":"institution_MIGX_TV","renderer": "this.renderChunk"}

                Then inside your main chunk:

                <div> [[getImageList?
                &value=`[[+institutions]]`
                &tpl=`institutions_MIGX_TV`
                ]]</div>

                ..use something like this .. see that the value and field is the same name. And the tpl institutions_MIGX_TV has the fields of the nested migx tv.
                  • 40045
                  • 534 Posts
                  @yuka123

                  That's how I do it at the moment, but performance is definitely an issue with this construction^^, so I'm looking for better ways. Bruno suggested a use of bloX with a custom getdata class, but I have to wrap my head around this first...I also wrote a little snippet that converts all the json objects into arrays (doesn't matter how many) to process them at the same time. it's faster but I cannot add snippets or chunks INTO the json fields because they get not processed...so also not a good option (yet) =)...
                    • 39465
                    • 14 Posts
                    Where did you notice preformance issues? I've used it that way and so far I can't notice any difference in performance(maybe my usage is not of as large scale as yours). It's not the most beautifull solution but it is pretty simple.
                      • 40045
                      • 534 Posts
                      Basically load time when cache is empty =), takes about 4-6 seconds to render a page which is unacceptable, but I don't blame it all to getImageList, I also have a lot of conditionals (output modifiers) in the tpl chunks, so that also adds up to the load time, but I think it's a combination of both. And yes, it's quite simple and it works, but there is optimization potential!