
10 WebMaker Language (WML)
To use a node rule, you associate it with a node-triggering paragraph tag, as described in "WML primary paragraph rules" on page 96. You can use a node rule in more than one node-triggering paragraph types. 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 and SEARCH. See "Specification of attributes of a node rule" on page 92.
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 "The header and footer of a node rule" on page 93.
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 "The header and footer of a node rule" on page 93.
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));
}
}

Generated with Harlequin WebMaker