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
-
☆ 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.
Great! That’s what I wanted to hear.
Very useful link too, thanks, that will come in handy.
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.
-
☆ 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)
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.