Z.u.L. > Documentation > Context Help

HTML Export with Templates

Templates are a comfortable way to export your construction to HTML. The program loads a template for the HTML page, and fills in the necessary information replacing all placeholders on the template page. The dialog is much shorter, since most information is continained in the template file, including applet size, applet and page colors, style sheets and archive position.

The documentation of C.a.R. contains some templates to start with. Template files use the extension "*.template". You can edit these template files with any file or HTML editor. Foreign language users should disable UTF-8 in the settings dialog, or they must use an editor, capable of handling UTF properly (e.g my text editor JE, the HTML editors of Mozilla, or Frontpage by MS, and many others). You can base your template on the template files that come with the documentation.

The following placeholders are recognized in template files.

#title
Replaced by the construction title as shown in the export dialog.

#comment1,#comment2,...
This will be replaced by the section of the construction comment with the corresponding number. Comment sections are separated by lines consisting of "~". Each paragraph of the comment section will be bracketed by <p>...</p>.

#comment
Works like text, but does not look for comment sections.

#text1,#text2,...
Works like #comment1,... but does not generate paragraphs <p>...</p>. The user can provide any HTML-tags he likes.

#text
Works like #text1,... but does not look for comment sections.

#parameter
Inserts the applet parameters: file or job, style, tools and options.

#color
Inserts the applet parameters for colors.

#font
Inserts the applet parameter for fonts and digits.

#codebase
The codebase from the export dialog.

Here is a very simple template file.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
<TITLE>
#title
</TITLE>
</HEAD>
<BODY BGCOLOR=#F0F0F0>
<H1>
#title
</H1>
<CENTER>
<P>
<APPLET CODE="rene.zirkel.ZirkelApplet.class" #codebase WIDTH="400"
HEIGHT="400" ALIGN="CENTER">
<PARAM NAME="color" VALUE="240,240,240">
#parameter
</APPLET>
</P>
</CENTER>
#comment
</BODY>
</HTML>

Related topics: HTML Export, Saving and loading files, Comments, Special Settings

Next topic: Export Dialog