We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30912
    • 463 Posts
    is it possible to run event handler requests on MIGx? We need to remove a Gallery from Gallery when an item is removed from the MIGxdb we are using.

    We also need to process a snippet to get an id from a gallery which is selected from a dropdown - can we do this?

    Apologies for the vague questions =]

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

    • discuss.answer
      • 4172
      • 5,888 Posts
      I think you can extend your xpdo-schema with a gallery-object and have a composite-relation from your object to the gallery-object (connected by gallery-id).

      This way the gallery should be removed, when your object is removed.

      If you also want to remove all the related images and everything you can extend your object-class with a custom remove-function.


      To get the gallery-ids in your input-options you can use a @EVAL - binding and run a snippet for example migxLoopCollection to get the galleries with its ids.

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

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 30912
        • 463 Posts
        can the result from migxLoop be passed back into a snippet?

        the reason is this: https://forums.modx.com/thread/83283/display-images-in-tv-list-in-the-manager-for-selecting-first-image#dis-post-483986

        Thanks