We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    I have been working with some extjs stuff to enhance the functionality of my reptiles records site. I am to the point where I need to integrate it into modx. I had done this with my read-only php trials, and it was fairly easy.

    One thing I do not know how to deal with is calling functions to my current php scripts...dbcall.php?act=updateblah... I assume my php files will become snippets, but these will then need to be called from javascript.

    At present, my extjs stuff is rendered within modx, but all of the database calls are done via external php files.

    I would like to get rid of the external php and create a tighter bond with modx. Has anyone done anything close to this?

    Thanks!
      • 28215
      • 4,149 Posts
      We have, in essence, done this with MODx Revolution 2.0, that uses ExtJS 3.0, with what we call "connectors".

      However, for custom pages, you can do so by putting your "processors" (what I’ll call your external PHP scripts that ExtJS sends AJAX to) into snippet calls on blank template pages, where the only thing in the pages is that snippet call.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 10226
        • 412 Posts
        Sounds great, can this be done as easily in 1.0? For some unknopwn reason I am unable to install Revo.

        Thanks!

        ---

        Actually I was able to get revo installed just now smiley smiley

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Yes. Just make a snippet with your processing code, create a new document with no template and no content except for the snippet call, and use the URL to the document in your AJAX.
            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
            • 10226
            • 412 Posts
            Quote from: sottwell at Aug 15, 2009, 05:20 PM

            Yes. Just make a snippet with your processing code, create a new document with no template and no content except for the snippet call, and use the URL to the document in your AJAX.

            Pretty slick!

            Thanks!