Next Previous Up Top Contents Index

WebMaker User Guide

10.1.2 Example: Creating a rule for warnings

In this example, we want to modify the QuotedText rule to be used for warning paragraphs. Thus, we copy the QuotedText rule, rename it to WarningBold, edit the comment to describe the new rule, use the concatenate WML function to write out the word Warning:, and use the strong WML function to make the word Warning: appear in a strong character font. The definition of the WarningBold rule is:

# Warning specifies that text be displayed as a BLOCKQUOTE,
# separated from text above and below by a blank line.
# Warning also displays the word "Warning" in bold before the text.
PARAGRAPH "WarningBold" TYPE Normal
{
  CONTEXT Quote
  ACTIONS
  {
    write(*,concatenate(strong("Warning: "),
                        paragraph(text())));                        
  }
}