We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26482
    • 138 Posts
    Hi,

    I have a user who uploads 30+ html files via SFTP to the server (in the assets/files folder, on which Modx runs). These are tennis tournament schemes (changing every day) with 1 index.html that is static. I need to include all files into the content area of the site and have found various methods of doing so, but I’m not sure which is best suited for this. I can change the urls in index.html, however the 30+ schemes can’t be touched. I can make 30+ documents and in each include the specific file, but that doesn’t seem effecient.

    How would your approach look like?
      • 29181
      • 480 Posts
      Hi,
      if the 30+ documents are always going to have the same name, I’d look into using a weblink (if that’s still the politically correct name for them).

      That will save you having to change anything at all...apart from uploading the new versions of the schemes to replace the older ones.

      I don’t think you can get much more efficient than that...if I understood you correctly that is!

      Hth;
      Taff
        Adrian Lawley: www.adrianlawley.com
        • 26482
        • 138 Posts
        Hi,

        Thanks for your answer. I’ve thought about that. That is an easy way to link to the files, however, I haven’t found a way to actually include them in the content area. Doing it this way directly links to the files, bypassing any Modx markup. Right?

        Thanks.
          • 26482
          • 138 Posts
          Thanks, but won’t I need to repeat the same steps each day? These schemes change on a daily basis. However, this does achieve my goal of having the content into the content area smiley

          Would there be a less repetitive way of achieving this?
            • 33372
            • 1,611 Posts
            Or if you just want a quick and dirty way of doing it the way you’re used to but in MODx, just create a snippet that reads each of the files and outputs them in whatever format you like and put that snippet in the content area where you want it to appear.
              "Things are not what they appear to be; nor are they otherwise." - Buddha

              "Well, gee, Buddha - that wasn't very helpful..." - ZAP

              Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
              • 29181
              • 480 Posts
              I think implementing something like

              http://www.phpbuilder.com/tips/item.php?id=113

              into a snippet would be the best approach as suggested.

              Hth,
              Taff
                Adrian Lawley: www.adrianlawley.com