8.4. navbar-frame.html.wml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE
    html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<title>Navigation Bar</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="StyleSheet" href="$(ROOT)/style.css" type="text/css" />
</head>
<body>
<define-tag navbarlink>
# Check if we are an index page and define suffix accordingly
<if <match "%0" "(/$)|(^$)" action="report" />
    <set-var suffix="index.html" />
    <set-var suffix="" />
    />
<a href="%0<get-var suffix />.frames.html">%1</a>
<br />
</define-tag>

<p>
#include 'navbar.wml'

<br />
<a href="$(ROOT)">No Frames Version</a><br />
</p>

</body>
</html>

Explanation

One can see her use of variables - <set-var ... > and <get-var ... >.


Written by Shlomi Fish