Tricking the TOC to point to 'outside' HTML

Summary

Here's a dirty little trick to get the TOC in a WebWorks Help project to point to non-WebWorks-generated HTML, such as Javadoc. There are probably smarter and cleaner ways of doing this, but it works. You will have to follow Steps 5 - 7 each time you generate your project.

Detailed Description

1. In FrameMaker, create a "dummy" book file (mine is called 'link.book')

2. Add title pages to the book file that contain the text you want to appear in the TOC. The title text must use the same paragraph tag you use for your book titles. For example, I have two title pages in my book file.

3. Add your 'link.book' file to your project.

4. Generate your project.

5. Locate the following files in your output folder:

6. Open each file in a text editor and locate the title text for each TOC entry to point to 'outside' HTML.

7. Edit the 'href' tag to redirect the link to a RELATIVE URL.

For example, in my files, I make the following edits:

In files.xml:

Change:

To:

In files.js:

Change:

To:

Example PERL Script

If you have a lot of edits and/or regenerate your project often, you could automate this update process via a simple PERL script.

Here's an example:

# To run enter: perl UpdateTOC.pl

$path = "C:/MLD_docs/WebWorks/804_Documentation/Output/WebWorks Help 5.0/804_Documentation/wwhdata";

print $path;

@infiles = qw(

);

MAIN: foreach $infile (@infiles) {

}

close(INPUT) ; close(OUTPUT) ;



HelpCenter/Tips/WebWorksHelp/Modifying_WebWorks_Help_TOC_to_Point_to_Javadoc_and_other_HTML (last edited 2008-06-30 20:03:16 by GordonFurbush)