I’m struggling to open an external page within MODx. So far, I could get it to run in an Iframe using the TV View Port, but I know some people don’t like this method. What is the best option? Is Iframe OK?
I’ve also tried to use include virtual statement but then have a problem with links not opening in ModX if it’s another forlder than the root, etc. Any way somebody can help. I’ve searched the forum but no post really helped me.
Help appreciated!
I think the best solution depends a lot on what kind of document you are including.
So maybe you could tell a bit more about what it is, and why it should be included in the page?
MODx snippet-glossary 101:
Ditto = Content Lister -- Wayfinder == Menu Builder -- Jot = Comment Control
Documents will differ from time to time, but at this stage the most important are php files running a database development that is in a different folder.
It might also be a database folder from time to time running on another domain.
The include statement opens the database, but the css files from MODx and the databse seem to clash with eachother. Also, clicking on links, opens the next page outside of MODx template.
The Iframe works fine, but I know some browsers don’t support it. Is there real issues using the Iframes?
If the pages being pulled in end up going through the MODx parser, any PHP code will be stripped out (all PHP code in MODx has to be in a snippet).
You could probably write a snippet that would get the content of the other pages and return it to MODx.
Anyone with suggestions how to do this?
Can you please provide some code for how to achieve this. Can’t seem to get this right.