Customized HTML frameset

Publish

Platform_KC
On Premises

When your book is published to HTML, Author-it uses the frameset template defined under the HTML settings of the book object to build an integrated website with intuitive navigation.

Using HTML, customize this frameset to meet your specific requirements. For example, add a banner-like frame containing your company name and/or logo to the top of the frameset.

Tip Use a variable in the banner file to pull the title from the book object.

To customize the HTML Frameset:

  1. Start by creating a new folder that contains the necessary files - call it something like 'Website' for easy identification.
  2. Copy all the files from the ..\Templates\CGI FTS folder to begin with, as this folder contains the default files we use for HTML output with a full text search. Then adapt, customize, or replace these files to suit.

    The frameset included in this folder (html_frameset.htm) has 3 frames as follows:

    Default Frameset

    • TAB frame - appears in the top left and displays the tabs. By default it displays tab_toc.htm. This HTML page contains several graphics with links to display the indexpage.htm and the search window.
    • TOC frame - appears in the bottom left and displays the contents, index, and search pages. By default toc.htm is displayed. Author-it always names the first TOC page toc.htm.
    • BODY frame - appears on the right and displays the content. As the filename of the first page in a content is unknown, the default in the frame is a placeholder called main.htm. When publishing, Author-it renames this to the first HTML page in the content.
  3. Adapt this frameset by adding another frame along the top with your company banner, so it looks something like:

    Custom Frameset

  4. Specify the file and correct path to the new html_frameset.htm in the HTML Frameset property on the HTML tab of the book object.
  5. Under the HTML Additional Files property of the book object, specify the supporting files required. In this case:
    • tab_toc.htm - this file displays the Contents tab as active in the TAB frame.
    • tab_index.htm - this file displays the Index tab as active in the TAB frame.
    • tab_search.htm - this file displays the Search tab as active in the TAB frame.
    • contents1.gif, contents2.gif, contents3.gif - the 3 different states of the Contents button. You can replace these with custom graphics.
    • index1.gif, index2.gif, index3.gif - the 3 different states of the Index button. Again, you can replace these with custom graphics.
    • search1.gif, search2.gif, search3.gif - the 3 different states of the Search button. Again, you can replace these with custom graphics.
    • tail.gif - an 'invisible' image that completes the TAB frame.
    • and most importantly, the new banner.htm file called by the frameset.

      Note: Make sure to select the files from your new folder.

  6. Open the table of contents object and set the Plain HTML Contents Display property in the HTML tab to use the custom frameset defined in the book object.

    Custom Frameset - TOC Object

  7. Open the media object used by the TOC object (usually 'Contents Section') and set the TOC to use the toc_template.htm custom page from the new folder.

    Custom Frameset - Contents Media

    Note: In this page, some JavaScript executes in the onLoad event that loads the tab_toc.htm file in the TAB frame. This keeps the tab appearance synchronized with the contents no matter where the contents is called from.

  8. Open the media object used by the index object (usually 'Index Section') and set the index to use the index_template.htm custom page from the new folder.

    Custom Frameset - Index Media

    Note: In this page, some JavaScript executes in the onLoad event that loads the tab_index.htm file in the TAB frame. This keeps the tab appearance synchronized with the Index no matter where the index is called from.