In this section, we copy the LevelOne
node rule from nodesBTI.wml
to a new file, custom-nodes.wml
. The original definition of the LevelOne
node rule appears in Figure 10.1. We modify the copy of that node rule to change the appearance of the header and the footer. In the header, we add our company's logo file followed by a horizontal rule above the navigation buttons. In the footer, we remove the phrase "Generated by Harlequin" and add our copyright notice, "Copyright (c) 1996 ACME, Inc. All rights reserved."
Note that we must place a copy of the graphic file containing the company's logo (acme-logo.gif
) into the directory containing the HTML output, so that the HTML files that reference that graphic will find it.
NODE LevelOne { TITLE concatenate(headingnumber()," ",headingtext()) HEADER { @NavPanel=concatenate( button( image("next.gif",BOTTOM), filename(next), image("nextg.gif",BOTTOM))," ", button( image("prev.gif",BOTTOM), filename(previous), image("prevg.gif",BOTTOM))," ", button( image("top.gif",BOTTOM), filename(top), image("top.gif",BOTTOM))," ", button( image("content.gif",BOTTOM), filename(TOC), image("contentg.gif",BOTTOM))," ", button( image("index.gif",BOTTOM), filename(INDEX), image("indexg.gif",BOTTOM)) ); write(*,paragraph(@NavPanel)); write(*,paragraph(maintitle())); } FOOTER { write(*,toc(1,local)); write(*,hrule()); write(*,address(concatenate(maintitle()," - ",date()))); write(*,paragraph(@NavPanel)); @Hqn=concatenate( "Generated with ", button("Harlequin WebMaker","http://www.harlequin.com/webmaker") ); write(*,paragraph(@Hqn)); } }
Figure 10.1 Original definition of LevelOne node rule.
NODE LevelOne { TITLE concatenate(headingnumber()," ",headingtext()) HEADER { @NavPanel=concatenate( button( image("next.gif",BOTTOM), filename(next), image("nextg.gif",BOTTOM))," ", button( image("prev.gif",BOTTOM), filename(previous), image("prevg.gif",BOTTOM))," ", button( image("top.gif",BOTTOM), filename(top), image("top.gif",BOTTOM))," ", button( image("content.gif",BOTTOM), filename(TOC), image("contentg.gif",BOTTOM))," ", button( image("index.gif",BOTTOM), filename(INDEX), image("indexg.gif",BOTTOM)) ); write(*,image("acme-logo.gif",TOP)); write(*,hrule()); write(*,paragraph(@NavPanel)); write(*,paragraph(maintitle())); } FOOTER { write(*,toc(1,local)); write(*,hrule()); write(*,address(concatenate(maintitle()," - ",date()))); write(*,paragraph(@NavPanel)); write(*,paragraph("Copyright (c) 1997 ACME, Inc. All rights reserved.")); } }
Figure 10.2 Revised definition of LevelOne node rule (changes underlined).