6.1. The New Template File

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<title>{#SUBJECT_LOC#}</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="$(ROOT)/style.css" type="text/css" />
</head>
<body>

<table class="layout">
<tr>
<td class="navbar">
<ifneq "$(FILENAME)" "index.html"
    "<a href="$(ROOT)/">Main</a>"
    "<b>Main</b>"
    />
<br />
<ifneq "$(FILENAME)" "download.html"
    "<a href="$(ROOT)/download.html">Download</a>"
    "<b>Download</b>"
    />
<br />
<ifneq "$(FILENAME)" "links.html"
    "<a href="$(ROOT)/links.html">Links</a>"
    "<b>Links</b>"
    />
<br />

<br />

<a href="mailto:webmaster@mysite.org">Webmaster</a><br />
</td>
<td class="main">
<h1>{#SUBJECT_LOC#}</h1>
{#BODY#}
</td>
</tr>
</table>

</body>
</html>

<define-tag subject>
{#SUBJECT_LOC#:%0:##}
</define-tag>

#   per default we are in body
{#BODY#:

Explanation

<ifneq ...> compares its first two arguments - if they are not equal, it expands to its third argument, else it expands to its fourth. There's also <ifeq ... >.


Written by Shlomi Fish