|
chm2web uses the following sections when creating the frame
version of a browser-based online help system:
If you template contains all these sections, do not forget to
add the word "FRAMES" to the BODY.INFO\TARGETS variable, which will
indicate that this template supports generating the frame version
of the help system.
[HEADER.BODY] {1}
This code is used to display the frame located above other
frames. The buttons for switching between the Table of contents,
index and help search, the help title and the help navigation
buttons are shown in it. The code from this section is displayed in
the frame named "header".
Three files are created when the help system is generated using
the code in this section: helpheaderc.html, helpheaderi.html,
helpheaders.html. The first file contains the help system title
with the active "Contents" button, the second one has the active
"Index" button and the third one contains active "Search"
button.
The code between "##CONTENTS_SELECTED_BEGIN##" and
"##CONTENTS_SELECTED_END##" will be used to display only the
"highlighted" (active) "Table Of Contents" tab, while the code
between "##CONTENTS_NOTSELECTED_BEGIN##" and
"##CONTENTS_NOTSELECTED_END##" will be used to display the inactive
state of the same tab.
The code between "##INDEX_SELECTED_BEGIN##" and
"##INDEX_SELECTED_END##" will be used to display only the
"highlighted" (active) "Help Index" tab, while the code between
"##INDEX_NOTSELECTED_BEGIN##" and "##INDEX_NOTSELECTED_END##" will
be used to display the inactive state of the same tab.
The code between "##SEARCH_SELECTED_BEGIN##" and
"##SEARCH_SELECTED_END##" will be used to display only the
"highlighted" (active) "Search" tab, while the code between
"##SEARCH_NOTSELECTED_BEGIN##" and "##SEARCH_NOTSELECTED_END##"
will be used to display the inactive state of the same tab.
The code between the ##INDEX_EXISTS_BEGIN## and
##INDEX_EXISTS_END## block will be used only if the generated help
system has index. The ##INDEX_SELECTED_BEGIN## and
##INDEX_NOTSELECTED_BEGIN## blocks must be inside this block.
You can use the #SCRIPT.NAVIGATE.NEXTPAGE# and
#SCRIPT.NAVIGATE.PREVPAGE# variables in the code of the HEADER.BODY
section. These variables should be used as handlers activated once
the navigation buttons are pressed. They contain javascript code to
move to the next and previous pages of the help system
respectively. An example of their use:
<IMG src="files/next.gif" alt="#VARNEXTCAP#"
onClick="#SCRIPT.NAVIGATE.NEXTPAGE#">
Beginning from version 2.6, you can add the command of printing
the current page of the help system to your template. To do it, you
can use the #SCRIPT.PRINT# variable in the code of the HEADER.BODY
section. This variable should be used as a handler activated once
the print button is pressed. Example:
<IMG src="files/print.gif"
alt="#VARPRINTCAP#" onClick="#SCRIPT.PRINT#">
[PAGE.HEADER.BODY] {2}
This section is optional and its code is used to create the file
pageheader.html that can be used as the help system title together
with the navigation buttons. Unlike the [PAGE.HEADER section], the
[PAGE.HEADER.BODY] section cannot display buttons for switching
between the table of contents, index and full text search, i.e. it
cannot contain the blocks ##CONTENTS...BEGIN##, ##INDEX...BEGIN##
and ##SEARCH...BEGIN##.
You can use the following variables inside this section:
#SCRIPT.NAVIGATE.NEXTPAGE#, #SCRIPT.NAVIGATE.PREVPAGE#. Their
description can be found above.
[CONTENTS.BODY] {3}
This code is used to generate the frame containing the table of
contents. It must contain the #CONTENTS.TREE# variable that will be
substituted with the code displaying the table of contents when the
help system is created.
[INDEX.BODY]
This code is used to generate the frame containing the help
index. It must contain the #INDEX.TREE# variable that will be
substituted with the code displaying the help index and the input
field for quick navigation through it when the help system is
created.
[SEARCH.BODY]
This code is used to generate the frame containing the full text
search. It must contain the #SEARCH.PAGE# variable that will be
substituted with the code displaying the input field for entering a
search query and the list of found matching pages when the help
system is created.
[MAINFRAMESET.BODY]
The code of this section is used to generate the main frameset
of the help system (the index.html file). It must contain the
<FRAMESET> tag as well as at least three frames named
"header", "toc" and "contents". The "header" frame is to load the
page with the name specified in the "#HEADER.CONTENTS.NAME#" variable. The
"toc" frame is to contain the page specified in the "#CONTENTS.FILE.NAME#" variable. The
"content" frame is to load the page with the "#START.FILE.NAME#" name. To be able to
open the help system with the Search or Index tab already selected
(opened with index.html?tabi or index.html?tabs), you should use
the construction ?TAB:(contents
selected)|(index selected)|(search selected)? in the
frameset to specify the files that should be used when the
corresponding tab is open.
The typical frameset code used in this section is given
below:
<frameset rows="#HEADER.HEIGHT#,*"
frameborder="yes" framespacing="2" border="0"
bordercolor="#SCHEMECOLOR3#">
<frame name="header" src="#HEADER.CONTENTS.NAME#">
<frameset cols="#VARCONTENTSWIDTH#,*"
frameborder="yes" border="4">
<frame name="toc"
src="?TAB:#CONTENTS.FILE.NAME#|#INDEX.FILE.NAME#|#SEARCH.FILE.NAME#?
>
<frame name="content" src="#START.FILE.NAME#"
>
</frameset>
</frameset>
|