We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    What system event can I use to preset something just before the "MODX Browser (web)" pops up?

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

      • 3749
      • 24,544 Posts
      Here's a list of all the events: http://bobsguides.com/modx-revolution-events.html.

      I don't know what you mean by "browser popup," but you might want OnWebPagePrerender, which fires after a web page has been parsed, but before it is sent to the browser.

      If you explain what you're trying to do, we may be able to give a better answer.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 47562
        • 113 Posts
        Actually, thinking about it, I'm sorry, the question doesn't make sense. The events are in the front end, so I'm not thinking straight.

        What I need to do is dig into the code a bit, 'cuz for some reason, I haven't been able to get an image selection within MIGX to come up in the proper directory context. I've set my media source correctly, I think; both basePath and baseUrl are set to "assets/images/product/", but for some reason, the directory context of the browser continues to come up at the site root. I'm resorting to the sledgehammer approach to see if I can't set it manually...
          • 3749
          • 24,544 Posts
          OnWebPagePrerender does fire in the front end and you can do a str_replace() to correct just about anything before the browser gets the page. That said, you're right that there really ought to be a way to actually fix the problem. Not being a MIGX expert, I can't help you there.

          Calling Bruno17. wink
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
          • discuss.answer
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I have found that instead of using the built-in inputTVType I have to use inputTV, and create an image TV with the desired media source to use with it.

            {"field":"image","caption":"Image","inputTV":"migxImage"}
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 47562
              • 113 Posts
              Wow, that took care of it! inputTV works like a champ, and MIGX is awesome.

              Thanks so much, Susan, I really appreciate your help.