Next Previous Up Top Contents Index

WebMaker User Guide

12.5 Node rules

Node rules are the equivalent of FrameMaker master pages. Each node rule describes an HTML page type independently of its contents. Node rules typically define the navigation panels.

To use a node rule, you associate it with a node-triggering paragraph tag, as described in Section 12.6, "Primary paragraph rules". You can use a node rule in more than one node-triggering paragraph tag. It is useful to have different kinds of node rules: one typical example is that the first page of the web is usually a different kind of node than the nodes triggered by heading paragraphs.

The general format of a node rule is:

NODE nodename
{ 
  specification of attributes
    HEADER  {
      specification of what appears at the top of the node }
    FOOTER  {
     specification of what appears at the bottom of the node }
}

The elements of a node rule are:

NODE, HEADER, and FOOTER are WML keywords.

nodename is the user-assigned name of the node rule.

specification of attributes is the assignment of values to various node attributes, which may currently be the HTML TITLE or CLASS. See Section 12.5.1, "Specification of attributes of a node rule".

specification of what appears at the top of the node can be any combination of calls to WML functions to perform the actions desired when the new HTML file is created. See Section 12.5.2, "The header and footer of a node rule".

specification of what appears at the bottom of the node can be any combination of calls to WML functions to perform the actions desired when the new HTML file is closed. See Section 12.5.2, "The header and footer of a node rule".

An example of a node rule is:

# Define the entry page of the generated web.
#
NODE FirstPage
{
  TITLE maintitle()
  HEADER
  {
    @NavPanel=concatenate(
              button("[Next] ",filename(next),"[Next] ")
                         );
    write(*,paragraph(@NavPanel));
  }
  FOOTER
  {
    write(*,toc(1,local));
    write(*,hrule());
    write(*,address(concatenate(maintitle()," - ",date())));
    write(*,paragraph(@NavPanel));
  }
}