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?
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
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.
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.
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