We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3719
    • 13 Posts
    Hi, this may seem like an odd question but..
    Is it possible to have, on your web server alongside your MODx Revo install, another folder in Root which contains php pages and a database which is not controlled by MODx and does not interact with it - and still link those pages from MODX such that www.domain.com/example returns a page from this other subfolder?

    Basically I have requirement for a website that is controlled by MODx, and for a 3rd party to put up pages that gather data in to another database (not MODxs) and yet it must appear to be part of the same website.

    Does that make sense?

    B
      • 29019 ☆ A M B ☆
      • 104 Posts
      Yeah, most definitely. MODx plays well with others. Linking to content or data within MODx from your third party files is fairly easy too - you can read more about that here. You might want to use that to get common chunks on your third-party pages.
        www.darkstardesign.com

        Are you in the Nashville area? Join us for our next MODX meetup!
        • 3719
        • 13 Posts
        Great! That’s what I wanted to hear.
        Very useful link too, thanks, that will come in handy.
          • 3719
          • 13 Posts
          OK now that I come to do it, any thoughts on the best way of configuring this?

          I know I can create a subfolder under root, upload php pages to that and then weblink from MODx, but that will display the folder path, which isn’t ideal. For example, if I upload test.php to a directory /example, then the URL for that page will be domain.com/example/test.php

          Is there a neater way to do it? I don’t want to dump php pages directly into the root folder.

            • 18373 ☆ A M B ☆
            • 3,141 Posts
            I don’t know what your specific app does, but you could make it into a snippet, and have it return the value (instead of echo-ing or something similar) and use it in a MODX resource.

            You would then have the benefits of nice URLs, and you can still access your php through the snippet.


            (The snippet could even just include the php file, should you want to)
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 3719
              • 13 Posts
              Thanks Mark.

              The app will be used to run marketing surveys, competitions that require data entry etc. It will be a third party who produce the code/pages and they will be using data in a separate database from MODx, so I’m trying to balance out giving them all the access they need to get the job done without them having too much access to MODx.

              The snippet idea sounds good for keeping nice clean URLs. Will give it a go.