Topic split example

CHM

Split example - Main Topic 1

It's possible to have one mega HTML file splitting into several files by using a HHCTRL.OCX split file object tag in your HTML. This instructs the HTML Help compiler to split the HTML file at the specific points where it finds this tag. The object tag has the following format:

  <object type="application/x-oleobject"
     classid="clsid:1e2a7bd0-dab9-1­1d0-b93a-00c04fc99f9
     <param name="New HTML file" value="a_new_file.htm">       e.g "topic-04.htm"
     <param name="New HTML title" value="My new topic title">  e.g. "Topic 4"
  </object>

The first value - "file" - specifies the name you want to give to the file that would be created for this topic. The second value - "title" - specifies what you would want in the <TITLE> tag for the document. You shouldn't change any details apart from the value parameter.

The file then gets created within the .chm file at compile time, though you'll never see it on disk. A pretty neat feature.

The trick of course is that if you have links in your .chm file, whether from the contents/index or from topic to topic, you'll need to reference the file name that you specify in the tag above.

If you are using HTML Help Workshop, you can use the Split File command on the Edit menu to insert the <object> tags.

The following hyperlink displays a topic file in popup-type window:

Link from this main to topic 4 (only working in the compiled help CHM and for a locally saved CHM)

<a 
 onClick="window.open('topic-04.htm','Sample',
 'toolbar=no,width=200,height=200,left=500,top=400,
 status=no,scrollbars=no,resize=no');return false">
 Link from this main to topic 4</a>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

back to top ...