We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8830
    • 98 Posts
    I would really need some help with this last bit.

    I don't seem able to load anything from mediaFile from the frontend.
      • 4172
      • 5,888 Posts
      inistall the bloX - package and
      try to use bloX instaed of the migx-snippet.

      outer-call:
      [[!bloX? &packagename=`yourpackagename` &classname=`yourouterclassname` &sortConfig=`[{"sortby":"pos","sortdir":"ASC"}]` &where=`{"published":"1"}` &tpls=`row:youroutertpl`]]


      in youroutertpl:
      [[!bloX? &packagename=`yourpackagename` &classname=`yourinnerclassname`  &where=`{"medialist_id":"[[+id]]"}` &debug=`1` &tpls=`row:yourinnertpl`]]


      something like that should do it.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 8830
        • 98 Posts
        That seems to be working a lot better. Thank you.

        How do I remove/control all those divs created outside of my tpl chunk, and the pagination?

        I tried looking in the code for bloX but couldn't make any sense of it.

        I didn't find any documentation either .. seems brand new smiley
          • 8830
          • 98 Posts
          I dug a little bit deaper into the bloX code.

          To solve my problem I added bloxouter:mediaListOuterTpl|| to the tpls parameter of bloX, and have a mediaListOuterTpl chunk with only this as content:
          [[+innerrows.row]]

          Seems to work fine.

          Is this the correct way to go?
            • 8830
            • 98 Posts
            I'm starting to get a hang of bloX.
            I am missing "idx" in row tpl though smiley
            I hope it's on the feature list for some upcoming version.

            Great job with MIGx in general BTW. It's truly a huge contribution to MODx. I hope it gets totally integrated into MODx some day.

            Thank you for your help.
            Hopefully I'm all set now smiley
              • 4172
              • 5,888 Posts
              I am missing "idx" in row tpl though


              try:

              [[+blox.iteration]]
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 8830
                • 98 Posts
                +blox.iteration works great!

                I noticed something wrong though.
                I get this error when trying to remove an item from mediaFile by rightclicking in the grid -> "Delete" -> "Yes":
                quip.thread_err_ns

                Also when I try to edit an item in mediaFile, it shows empty fields in the popup.

                With or without quip installed doesn't make a difference.

                Adding new items to mediaFile seems to work fine.
                Also mediaList seems to work fine. [ed. note: Eminos last edited this post 11 years, 5 months ago.]
                  • 8830
                  • 98 Posts
                  Is this "quip error" a bug or am I doing something wrong?
                    • 4172
                    • 5,888 Posts
                    this is still untranslated stuff, left there since i started with xdbedit with code-examples from quip.

                    I think it comes from this part in the processors:

                    if (empty($scriptProperties['object_id'])) {
                        $updateerror = true;
                        $errormsg = $modx->lexicon('quip.thread_err_ns');
                        return;
                    }
                    


                    This means the grid doesn't send an object_id to the processors.

                    Do you have the field 'id' in your columns?
                    Without having an id-field in your grid (this can be hidden from grid), the processor doesn't know which record to delete or to edit.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 8830
                      • 98 Posts
                      Amazing.
                      Thank you.

                      While I have you here I just want to ask two, a little bit off topic, questions:

                      1) Is it possible to enable "moving the grid items around (change order/position) by draging"?
                      2) Is it possible to enable "in grid editing"?

                      Both these things are available in MODx in general and in the MIGx Management.