home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
DINET
/
ORB13DOS.ZIP
/
HEADER.ORH
< prev
next >
Wrap
Text File
|
1996-11-17
|
3KB
|
63 lines
[[$/*]]
HEADER.ORH -- Common header file for Orb demo pages.
-------------------------------------------------------------
Standard header framework for Orb demo pages. Ordinarily,
in real multi-page site, this file would be included by
each page to get standard top-of-page layout elements and
variable definitions.
The variable 'title' must be defined in the including file
before this file is included! Note also that I've given
my own email reference, with one letter changed, as an
example of multi-level variable use -- you may wish to use
your own instead. I intentionally miswrote mine in order
to prevent a flood of accidental mail from Orb users trying
out this example.
The file FOOTER.ORH contains common footer information.
-------------------------------------------------------------
[[$*/]]
[[$def email cberry@xinenet.net]]
[[$def emailref HREF="mailto:[[email]]"]]
[[$def contact <A [[emailref]]>contact me</A>]]
[[$def sig <ADDRESS><A [[emailref]]>[[email]]</A></ADDRESS>]]
[[$def oto <A HREF="http://otohq.org/oto/">Ordo Templi Orientis</A>]]
[[$def home <A HREF="test1.html">Home Page</A>]]
[[$def subpage <A HREF="test2.html">Subpage Example</A>]]
<HTML>
<HEAD>
<TITLE>[[title]]</TITLE>
<LINK REV="made" [[emailref]]>
[[orb_generator]]
</HEAD>
[[$/*]]
A nice trick is to provide a default value for things set in headers,
but allow individual source files to override the default by setting
a special variable before including the header. Here, we use this
technique to control page background color; test1.orb will use the
default, while test2.orb sets the variable "bgc" to choose a different
color.
[[$*/]]
<BODY BGCOLOR=[[$val bgc "#CCCC99"]]>
[[$/*]]
If we wanted to keep the actual value selected around for later reuse,
a handy idiom is
[[$def bgc [[$val bgc "#CCCC99"]]]]
This will keep the existing value of bgc if it has one, or set it to
the default if it does not. Notice also that the example above is
not processed by Orb, since we're in the midst of a multi-line comment.
[[$*/]]
[[$// Note the unclosed <html> and <body> opened here in this file. ]]
[[$// These are closed in FOOTER.ORH at the bottom of each page. ]]