#! /usr/local/bin/ehtml
The <DISPLAY> code under EHTML is used to display the contents of a plain text file in your EHTML page. The primary advantage of using this code over directly modifying your home is the reduced risk of errors that could cause undesirable effects to your page. As well, files used with <DISPLAY> can be used in several different pages, allowing for consistency and easy alteration of your pages. For instance, standard "index footers" are a perfect application of <DISPLAY>. Note that the "plain text" described below can contain HTML codes for formatting, but not EHTML codes.
Since the <DISPLAY> code is responsible for displaying a plain text file to the screen, that text file must exist. As well, the text file must be "readable by the world". This is done by setting the appropriate "file permissions" under UNIX.
To begin the setup for the <DISPLAY> code, you must access a UNIX
prompt by either logging in to "alpha.vaxxine.com" using a terminal
emulator program or by using a
"
After logging in, you must enter your "html/ehtml" directory and create a
file containing the text that you wish to display as a message. If you
are not familiar with the use of the "pico" editor, which
will be referenced below, you may enter Ctrl-G while within the
editor to Get help.
To create a message file called "ehd_default.disp" which could be used
with the <DISPLAY> code, you would enter the following commands at
the UNIX prompt. You do not need to type anything after the semicolons
(;) as they are just comments.
cd ~/html/ehtml ; # Enter your "html/ehtml" data directory under UNIX
chmod a+rx . ; # This lets other people read messages in directory
pico ehd_default.disp ; # Enter message and Ctrl-X to exit
chmod a+rx * ; # Other people can read message files in particular
After your DISPLAY file was created in the way specified above, you must add the code to your document in order to display the message. In this example, you would use the standard basic code style of <DISPLAY ehd_default.disp>. Note that "ehd_default.disp" must be in all lower case since that is the way we named the "ehd_default.disp" file under UNIX.