We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42867
    • 5 Posts
    So I was going through the MIGXdb tutorial here http://rtfm.modx.com/display/ADDON/MIGXdb.Create+a+basic+gallery-management+from+scratch+with+MIGXdb and after following all the steps I can't seem to get the images to actually show on the frontend page.

    I tried using the two calls stated in the tutorial:
    [[!migx? &configs=`mygallery` &sortConfig=`[{"sortby":"pos","sortdir":"ASC"}]` &where=`{"published":"1"}`]]

    and

    [[!migx? &configs=`mygallery` &tpl=`@CODE:<img src="[[+image]]" />` &sortConfig=`[{"sortby":"RAND()"}]` &where=`{"published":"1"}`]]

    but nothing shows up.

    I also tried the call that worked for my standard MIGX install:

    [[!getImageList?
    &tvname=`myMIGXtv`
    &tpl=`thumbTpl`]]

    But still nothing, has anyone got this working?

    Thanks
      • 4172
      • 5,888 Posts
      try the migxLoopCollection - snippet.

      [[!migxLoopCollection? 
      &packageName=`mygallery`
      &classname=`myGallery`
      &sortConfig=`[{"sortby":"pos","sortdir":"ASC"}]`
      &where=`{"resource_id":"[[*id]]","published":"1"}`
      &tpl=`@CODE:<img src="[[+image]]" />`
      ]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42867
        • 5 Posts
        Thanks Bruno that worked perfectly, and I just changed the:
        &tpl=`@CODE:<img src="[[+image]]" />`
        to my phpthumbof call and it works great.

        Here is my call for anyone that is using phpthumbof:

        [[!migxLoopCollection?
        &packageName=`mygallery`
        &classname=`myGallery`
        &sortConfig=`[{"sortby":"pos","sortdir":"ASC"}]`
        &where=`{"resource_id":"[[*id]]","published":"1"}`
        &tpl=`thumbTpl`
        ]]

        Thanks,
        Ian
          • 4172
          • 5,888 Posts
          Thanks for reporting back. Updated the docs.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 40590
            • 9 Posts
            I'm not sure if this is a related issue, but I'm also experiencing strange behavior trying to use the getImageList snippet to output images. I've created a CMP to manage hidden child resources (inventory for a small shop). Each child resource (inventory item) has a number of TV's, including a MIGX TV so that I can add multiple images to each inventory item and display the images on the front-end.

            When I use getImageList in conjunction with getResources to create an inventory index page, all the images display properly. However, when I use getImageList in the child resource template, the path to the image doesn't get outputted. Additionally, when I use the same getImageList/getResources call i used to create the index page IN THE CHILD RESOURCE, the image associated with the current child resource doesn't get output. (All other TVs appear to output correctly)

            Here's a link to the inventory index page: http://c1091.paas2.ams.modxcloud.com/merch/

            If you click on any of the items, you'll see what I'm talking about.

            Should I be using a different snippet? What am I missing here?

            Thanks for any help you can give! [ed. note: mjpugh last edited this post 13 years, 4 months ago.]
              • 4172
              • 5,888 Posts
              do you or did you have your imageTV, which you are using for MIGX perhaps also assigned to a template?

              what are your getResources-calls and getResources-tpl-chunks and your getImageList-calls?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 40590
                • 9 Posts
                OMG, that was it...the imageTV being used by my MIGX TV was assigned to my child resource template. Once I unassigned it from that template, it works as expected. I really thought I had tried everything...thanks very much for your help, Bruno!
                  • 42867
                  • 5 Posts
                  Bruno,

                  I have a few more questions.
                  1) Is it possible to bulk/multi-upload files in Migxdb, instead of just uploading one file at a time?
                  2) Is it possible to bulk remove files? I can bulk delete, but not bulk remove.
                  3) and lastly is it possible to sort the files/images by drag and drop, or is using position setting the only way to re-sort?

                  Thanks
                  Ian