You are dealing with two distinct functions:
- Display dynamic content, some of which is read from a separate HTML file.
- Provide the ability to edit an HTML file.
There only thing the two functions have in common is that they read the same HTML file, which is achieved with a single line of code. Are you trying to combine the two functions simply to encapsulate related functionality in a single file, or is it so that you can display an Edit link in the dynamically generated output of function #1 above? If it's the latter, then you can still break the two functions in two separate .fwx files. One would perform function 1 and also return a link that would point to the second file, which would perform function 2 and then re-direct or link to the first file.
FoxWeb Support Team
Sent by Art Bergquist on 05/29/2015 03:19:41 PM:
I've been maintaining a FoxWeb web site for a while now. I am confident in the fixing/enhancing of existing web pages within the site and have also implemented some new web pages.
A particular new web page has, for some reason, proven a bit more challenging for me. We are currently maintaining an HTML file that is read by an .FWx file; the .FWx file incorporates the contents of the HTML file (primarily, text and links) and combines it with other HTML which it then renders. That all works fine.
We now want to enable the client to edit the HTML file himself (that way, he doesn't have to communicate the changes to me and wait until I get a chance to do that myself).
Specifically, I want to implement a web page that does the following:
- reads the contents of the HTML file and displays them in an edit box
- allows the user to modify that HTML within the edit box
- when the user clicks [Save], overwrites the HTML file on the web server with the new HTML
Can I do the above via one (1) .FWx or does it require two (2) .FWx files?