You might call me lazy (crazy?), but I love to use MS FrontPage to do as much work as I can. It's fast, easy, and creates reasonable code. However, it's border feature is just too rigid for my needs. I found an interesting utility that sort of solved the problem, but it required separate places for old files and replaced files. With MS FrontPage, this required me to edit the site in two different "Web areas". What I really wanted to do was to be able to totally replace specific areas of code at will, which is exactly what replaceHTML does!
Note: I haven't tried it, but replaceHTML should work with any GUI HTML editor.
replaceHTML will replace entire blocks of HTML code. Anything between the open and close tags is replaced with a specified file. You can even have multiple sets of tags in the same HTML file. Browsers ignore the replaceHTML tags, so they can remain in the code, allowing you to update the code whenever a change occurs.How to Set up
Here is a snippet of HTML code to show you how to use it:
<!--replaceHTML=file-->whatever HTML code exists<!--/replaceHTML-->
<replaceHTML=file>whatever HTML code exists</replaceHTML>
*Note: Some GUI editors have problems with second version (not MSFP).
"whatever HTML code exists" will be replaced by the fileRules
Do not split either the opening or closing tags between lines. For example, do not do this:
Do not enclose the filename in quotes, even if there are spaces
in the filename.
MS FrontPage Users Read!!!!!!
Their is a little anomaly when using replaceHTML with MS FrontPage you need to be aware of. If you are replacing a table that is inside the cell of another table, you need to add a little code. This situation happens all of the time when you are placing a menu table inside a larger page layout table.
Here's where you want the tag:
Once you save or switch from FrontPage's HTML view, it moves the tag:
The solution (for whatever reason!) is to add a <p> after the closing </table> tag, but before the </replacehtml>, like so:
Remember that the <p> must be part of the replacement file! (At the very end)
You only need to do this when the above situation exists. Add the <p> in other situations may cause problems!
Why FP does this is beyond me since it doesn't even know what the </replacehtml> tag does. It actually will do this if you place anything between <>, so at least it isn't a plot against me ;-) This is the only time I noticed this happening, but I suppose there could be other instances.
General Warning for All GUI Editors
Make sure the the GUI editor does not move the replaceHTML tags around. You may have to play with their placement to get things to work as expected.
Processing will be aborted for an HTML file if:
the replacement file is not found
Note that processing for other selected files will continue, unless you have clicked Abort.How to Use
1. Click the Select path... button (or use menu) and select target path. If you
only want to process HTML files check that option on the dialog.
The Processed file window will shows the processed file followed by the number of replacements made.
The Path field shows the path for the selected folder. This is for information only--the field is not editable.
replaceHTML has no effect on files that do not have the replacement tags in them.Files Menu
In the Files menu, there is a Recent Folders option. This will bring up a list of the last 20 unique folders (subdirectories) used to process files (i.e., not just selected).Options Menu
Select Backup originals to create backup files (i.e., before replacement) using .bak file extension. This setting is saved when you exit.
This option may clutter your directory, but it's better to be safe than sorry, particularly if you are using a GUI HTML editor--you just never know what it may do! (See the FrontPage warning above.)
If Error msg off is active, processing errors are not displayed, but written to a file called Error.log in the replaceHTML directory. It is probably best to keep this off, since you will usually want to stop processing if errors occur.
replaceHTML requires Windows 95, 98, or NT4.
replaceHTML (beginning with version 1.1) is freeware! However, I'd love to receive an e-mail (email@example.com) from you to hear what you think.
Copyright ©1999 Douglas J.