Getting WWH 5.0 to work with Cold Fusion
Version |
Date |
Changes |
1.0 |
2006-11-30 |
Initial version. |
1.1 |
2006-11-31 |
Modified so and so... |
Description
To secure a knowledge base (based on Web Works Help 5.0) on a customer facing website, we use Cold Fusion. To secure the files, it turns out you need to change all of the .htm frameset (in \Targets\<Target_Name>\Files\wwhelp\wwhimpl\common\html and \Targets\<Target_Name>\Files\wwhelp\wwhimpl\js\html) files to .cfm files. You also need to change all references to these files (in some of the generated .htm and .js files) to use .cfm.
Contents
What I've done so far
- Created a new Target.
Renamed all the existing .htm files to .cfm in \Targets\<Target_Name>\Files\wwhelp\wwhimpl\common\html and \Targets\<Target_Name>\Files\wwhelp\wwhimpl\js\html.
- Fixed all links in existing files to .cfm.
What I plan to do
- Do something so that when the project generates, it doesn't recopy all the htm files.
DONE - Do something so that when the project generates, the links in generated files point to .cfm files.
Renaming Frameset Files
My vague understanding, since I've never read anything about ColdFusion, is to get it to work with a set of HTML files, in a directory you want to protect via ColdFusion, you rename index.html to index.cfm and add the line "<cfinclude template="lock.cfm">" at the top of the file. You then need to add lock.cfm and application.cfm to the directory. (I got this from the webmaster. No idea how you get those files otherwise.)
However, because of all the frameset files with WWH, you also need to rename all the frameset files. To do this I did the following:
- Created a Target override.
- Copied over the contents of \Files\wwhelp\wwhimpl\common\html and \Files\wwhelp\wwhimpl\js\html.
Renamed all the files in those two directories .cfm, and added the header line "<cfinclude template="lock.cfm">" to all the files.
- Searched through all the .cfm files and changed any reference to *.htm to *.cfm.
I then searched through the original Format directory for *.htm references and fixed the references in the *.js etc. For your edification:
- \Files\wwhdata\common\wwhpagef.js
- \Files\wwhelp\wwhimpl\common\private\title.js
- \Files\wwhelp\wwhimpl\common\scripts\controls.js
- \Files\wwhelp\wwhimpl\common\scripts\help.js
- \Files\wwhelp\wwhimpl\common\scripts\related.js
- \Files\wwhelp\wwhimpl\common\scripts\switch.js
- \Files\wwhelp\wwhimpl\js\scripts\favorite.js
- \Files\wwhelp\wwhimpl\js\scripts\handler.js
- \Files\wwhelp\wwhimpl\js\scripts\index.js
- \Files\wwhelp\wwhimpl\js\scripts\outline.js
- \Files\wwhelp\wwhimpl\js\scripts\panels.js
- \Files\wwhelp\wwhimpl\js\scripts\search.js
- \Files\wwhelp\wwhimpl\js\scripts\tabs.js
WWH also includes a few generated *.js and *.htm files. You need to fix some files in the Transforms directory as well:
- \Transforms\wwhelp_splash.xsl
- \Transforms\wwhelp_entry.html (This creates default.htm, so you need to add the header text as well)
Not Copying .htm Files
Once this is done, when you generate your project, the Output\Files\wwhelp\wwhimpl\common\html and \js\html directories are full of the .cfm files and .htm files.
Now I start to dig into XSL files to try and figure out how to say "Don't Copy These".
