We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11858
    • 130 Posts
    I have a URL that dynamically creates HTML content to insert into a page. When you type the URL into a browser, the content returned looks something like this:

    <div class="title">
    This is the heading.
    </div>
    <div class="contentArea"?
    this is some content.
    </div>
    


    pretty basic HTML. How do I embed the code generated from that URL into a page on a MODx site?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Make the code into a snippet.
        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
        • 11858
        • 130 Posts
        Thanks for the reply Susan. The code being generated is not under my control and the content returned is location based - there’s a lat/long coordinate that is passed in through some variables in the URL itself.

        Actually, can I set up a snippet and use a php include call to that URL? That should work?

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Depending on your server configuration, there are a number of ways you can retrieve data from a remote URL.
            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