Physics and Astronomy
Home School documents Web pages Templated pages

# Templated web pages

Now that you know how to upload and edit your web pages it's time to create some.

1. In the directory (folder) you want to put your files, create an empty file called sidebar.txt. This tells the system you want to use our templates (you will customise it later).

2. The first document in any directory should always be called index.html (it's best if all your pages have filenames consisting only of lowercase letters, digits and hypens followed by .html).

• The School web-server will now automatically create the standard header and a sidebar for you, from a "bare bones" HTML file of the form:
<html>
<title>Some Physics at Exeter</title>
<body>
<h1>Lorem ipsum</h1>
dolor sit amet, consetetur sadipscing elitr, sed diam nonumy...
</body>
</html>

• The heading appears on the page and is typically quite short short; the title is what appears in search engines, bookmarks, etc. and should be descriptive enough to be understood out of context ("Introduction to lasers", not just "Introduction").

• If you have very HTML-aware editor that knows about such things you may wish to include the DTD and style file:
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'
'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<title>Some Physics at Exeter</title>
href='http://newton.ex.ac.uk/css/screen.css'>
<body>
<h1>Lorem ipsum</h1>
dolor sit amet, consetetur sadipscing elitr, sed diam nonumy...
</body>
</html>

Referencing our style sheet will automatically include our template: chat to me if you don't want this.
3. When you add your second HTML file to the directory you will want to edit sidebar.txt so that the sidebar gets inserted into each file for you automatically.

### If you're not using the templating system

Non-templated .html files will normally be treated as plain HTML, not server-parsed, which means that the apache include syntax won't work. This can be over-ridden by making your file executable.