
What's covered?This topic describes Method 1 of implementing terminology. It gives far more control as the author dictates exactly which instance of a term will be affected. On the other hand that is what makes it more time consuming. It also limits the terms that can be changed to those covered by the author. Please see Terminology Methods for a comparison of the two methods. |
Method 1 will work with both webhelp and html help compiled into .chm files, albeit using different scripts and methods. I have described the methods separately. Click here to jump to the HTML .chm methods.
There are some issues surrounding the following features. They may or may not be of importance to you but please do read these sections before you start work.
The Table of Contents and the Index
| Pete Lees | For his work on producing the scripts. |
| Rob Chandler | Whose script Pete Lees used for the compiled html version. |
| Rob Cavicchio | Whose work Pete Lees used in resolving issues with printing from a compiled .chm file. |
| Craig Clarke | Craig Clarke for testing the method with a compiled chm file. |
| John Dunne | For his method of updating the Table of Contents and Index. |
| Michael Long | For identifying that Step 3 needs to be undertaken in files other than those using variables if the output is a .CHM file. |
All I have done is describe the technique and create the demos and downloads.
These steps describe implementing the method for webhelp.
varCustomer = "Customer" varWarehouse = "Warehouse" |
Click in the field below and press Ctrl C.
| <script language="JavaScript">document.write(varWarehouse)</script> |
I have also tried the above method with web pages using FrontPage. It does not change the code. The variable will be displayed in the Preview tab but nothing will show in the Normal tab
You can use this method to insert images or create a table if required.
IMAGES
The variable will be something like varCompanylogo = "<img src='companylogo.jpg'/>" if the image is in the root of your project. The image does need to be within the project, use a relative path with forward slashes if it is not in the root. Also you need to add the image to baggage.
TABLES
Create a variable something like
varTable =
After the equals sign enter the HTML for the table you require and it works fine using the HTML from Dreamweaver 8. Use the HTML from RH and it will not work!
The HTML can be written over multiple lines so just cut and paste it from Dreamweaver starting on the same line as the variable name. Do not surround it with quotes.
There are two methods that can be used with compiled .chm help.
varCustomer = "Customer" varWarehouse = "Warehouse" |
Click in the
field below and press Ctrl C. You need to look at the code in your topics but potentially
you could search for this string </head> and replace it with this string in all topics in the help. <script language="JavaScript" src="ms-its:MyHelpFile.chm::/global.js"></script> </head>
Note that the name of the chm file (MyHelpFile.chm in this example)
must be amended to whatever name you will give the compiled help. The
chm filename has to be included to prevent problems when printing topics
from the compiled help.
You also need to include this script in the first topic that appears
under a book in the table of contents, even though that topic does not
have a variable in it. You might consider it easier to install this script
reference in every topic in the help using a multi file find and
replace tool.
That will avoid problems if you rearrange the TOC without thinking about
this. Click here for help with the search and replace.
| <script language="JavaScript">document.write(varWarehouse)</script> |
You can also use this method to insert images.
The variable will be something like varCompanylogo = "<img src='companylogo.jpg'/>" if the image is in the root of your project. The image does need to be within the project, use a relative path with forward slashes if it is not in the root. Also you need to add the image to baggage.
As explained under Method A, if you want the user to be able to amend the terms without the need for recompiling you need to follow the steps here. Click here for a mini robohelp project demonstrating this method.
varCustomer = "Customer" varWarehouse = "Warehouse" |
You need to look at the code in your topics but potentially you could search for this string
</head>
and replace it with this string in all topics in the help.
<script language="JavaScript" src="ms-its:MyHelpFile.chm::/global.js"></script>
</head>
The same script is used regardless of the level of the topic. You do not need to amend the path.A bug in X5 may prevent the javascript file being added to the Baggage. Click here for details of the workaround.
Please note that this file is different from earlier versions and is not the same as the terminology.js file used in other methods in this topic.
| <script language="JavaScript">document.write(varWarehouse)</script> |
You can also use this method to insert images.
The variable will be something like varCompanylogo = "<img src='c:/images/company_logo.jpg/'>"
The path must be absolute and use forward slashes.
Any terms in the TOC and Index will retain the values you have used when creating the project. I quote a posting from John Dunne re changing the terms here:
"I got a result by editing whtdata0.xml and whidata0.xml for the TOC and the Index respectively. You can edit using Notepad. Test first for snags. Large Indexes and TOCs may have several additional files (whidata1 whidata2 etc)."
The only observations I would add are:
The topic contains something like "varCustomer".
The user sees the term defined in the terminology file, this may be Customer, Client, Punter etc.
Whatever the term is, it does not exist in the topic so it will not be found by a search.
If your output is a compiled .chm file users can choose to print either the topic or the heading and its subtopics. There is no such option with webhelp.
If you have previously visited this page and used the scripts available prior to 12 November 2004, attempting to print the heading and it subtopics would have caused an error. These issues have now been resolved with very many thanks to Pete Lees and Rob Cavicchio.
There remains an issue though with printed output from the Printed Documentation option under Single Source Layouts. Quite simply nothing will be printed wherever a variable would appear in the online help. The solution here is to create a copy of your project using Windows Explorer and follow the steps below to produce a document using the default terms. Whilst in theory the procedure could be replicated any number of times to produce a different document for each customer, in practice I think you might find that rather time consuming. You have to sell these procedures on the basis that your client can have their own terminology in the online help but not in any printed manual.
The steps are:
![]()
Date |
Changes to this page |
| 14 Mar 2006 | Ability to use this method to insert images or create a table in webhelp added. |
08 Mar 2005 |
Instruction 3 amended for both methods of using terminology with .CHM output. |
29 Jan 2005 |
Introduction amended to fit with introduction of Method 2. The instructions for using the method have not been changed, other than renaming the two methods for chm help to Method A and Method B. |
20 Jan 2005 |
Instructions re amending relative path revised to recommend using a forward slash. |
28 Dec 2004 |
The printing issue with Method 2 for .chm files has been resolved. Very many thanks to Pete Lees and Rob Cavicchio for their work on that. All I do here is describe how it works. The fact that it works is thanks to those two gentlemen. |
24 Nov 2004 |
Topic rewritten to make it easier to follow. There does remain a printing issue with one of the two methods for compiled .chm files. That has been documented. |
12 Nov 2004 |
The script for use with compiled .chm output has been amended to resolve a printing issue. A new section has been added to cover producing printed documentation. |
25 Oct 2004 |
New step 6 inserted into webhelp method. This should help ensure you have correctly added the script and deal with a possible conflict between the demo project if used with RH X5. |
27 Aug 2004 |
Code to be added between <head> tags placed in a Form Element to make it easy to add it to the clipboard. Tip added to identify how to amend the path to the javascript file. Thanks to Rick Stone for suggesting these changes. |
23 Aug 2004 |
Various changes to script for .chm method to make method clearer. Reference added to the X5 bug that may affect the terminology.js file being added to the baggage. |
07 Aug 2004 |
Download added containing mini project showing how script is added. Correction made to a couple of references to the WYSIWYG editor which should have referred to the True Code editor. |
10 May 2004 |
Information about editing the TOC and Index added. Information about Searching added. |