Conference-CD

Template Specification

16 July 2004, Chris Cant

Introduction

Conference-CD-Wizard uses templates to generate output files in the CD burn image. The following description is a technical specification for putting templates together.

Template types

There are two types of template:
  1. Template archives: the template and all supporting files are stored in a single .htts file (that cannot be changed), eg BasicRed.htts. Only phdcc can make template archives.
  2. Ordinary template: the template and supporting files are stored as normal files (and so can be changed). The primary template is an .htt file, eg BasicRed.htt.
Evaluation and Standard license holders can only use template archives.
Professional Subscription license holders must use the %BRAND% template variable (defined below) in each template.

The template archives supplied in the Conference-CD development kit all contain "phdcc branding", ie the generated output mentions "phdcc", "PHD Computer Consultants Ltd" or "Conference-CD". The template archives available to Evaluation license holders also contain evaluation messages that most people would not want to see in production CDs.

phdcc may make more template archives and make them available for sale. A template archive may be marked so that (a) all Standard license holders can use it or (b) only a particular license holder can use it. If you are a Standard license holder and would like to use your own template, please email sales for a quotation for conversion into a template archive.

Common support files

A template consists of a primary template .htt file and any other support files that it needs, eg stylesheets and images.

However all templates share a few support template .htt2 files. These common support files are in the installation template root directory. Changing these files changes the output for all templates.

In addition, the template root directory also contains image file confcdlogo.bmp - this is the default image shown by the ConfCDGo program when the CD AutoRuns in Windows.

Internationalisation

Conference-CD-Wizard can generate output for any language. It achieves this by generating output in the UTF-8 character set.

The template HTML files therefore must be stored in the UTF-8 format. The Save dialog in Windows Notepad has an "Encoding" option: select "UTF-8".

In addition, the template page header must contain the following:

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

Output generated from the template

The output files are always HTML. The following files are generated:

Final CD structure

CD images produced by Conference-CD-Wizard have a set structure. In the supplied templates: In each folder, Conference-CD-Wizard includes file intro.htt (if it exists) before the main body of the page. This file must be in UTF-8 format.

Template files

A template is primarily defined in one file, with file extension .htt. However the template may refer to many other files, eg style sheets and images. (A template archive contains the .htt file and all the support files.)

The template primary file and its support files must be in the same directory. Sub-folders may not be used.

The primary template file specifies the support files and optional preview thumbprint as follows:

  1. An HTML comment line in the primary template specifies the list of support files. Conference-CD-Wizard extracts the file list and copies each file to the image confcd folder. Example support file list:

    <!-- Comma separated list of files to copy to confcd dir: Dependencies: style.css,image1.jpg,image2.gif -->

    The file list must be specified in an HTML comment. The file list must appear after the characters Dependencies:. The file list is a comma-separated list of filenames.

  2. A thumbprint image gives the Conference-CD-Wizard user a preview of the template. The image must be a BMP, with approximate size 200x100 pixels.

    A thumbprint is optional. Tell Conference-CD-Wizard the image filename in an HTML comment. The filename must appear after the characters thumbprint:, eg:

    <!-- BMP file thumbprint: thumb.bmp -->

Referring to template files

Conference-CD-Wizard can generate output based on the template in many folders. However the template support files are always in the image confcd folder.

To ensure that the generated file correctly refers to a support file, precede the support filename by %PATHBACK%confcd/. The %PATHBACK% template variable (defined below) is the path back to the CD image root. The following confcd/ then takes you to the image confcd folder. For example, here's show to refer to an image:

<img src="%PATHBACK%confcd/image2.gif">

If you use a stylesheet .css file in your template, then this file exists in the confcd folder. The .css file should not use %PATHBACK% to refer to files.

Template variables

A template must contain template variables to instruct Conference-CD-Wizard. Template variables have various uses:
%BODY% The main body of the generated page
%DESCRIPTION% The folder name (Home for the root)
%PROJECT_NAME% The project name
%CONFCDVERSION% The Conference-CD-Wizard version and date string
%DATE% The current date and time in RFC 1123 format, eg "Sun, 06 Nov 1994 08:49:37 GMT"
%PATHBACK% The path back to the root
%INCLUDE:filename% Include the UTF-8 filename if it exists in the source directory
%INDEX_START% ..
%INDEX_END%
Defines a section of HTML that is included if the project includes an alphabetic index. The HTML must provide this link: %PATHBACK%confcd/index.htm
%SEARCH_START% ..
%SEARCH_END%
Defines a section of HTML that is included if the project includes a search. The HTML must provide this link: %PATHBACK%confcd/search.htm
%CONTACT_START% ..
%CONTACT_END%
Defines a section of HTML that is included if the project includes a contact details page. The HTML must provide this link: %PATHBACK%confcd/contact.htm
%BODY_LINK_FILE_ATTR_START% ..
%BODY_LINK_FILE_ATTR_END%
Defines a section of HTML that is included in a BODY link attribute if the link is to a file.
%BODY_LINK_FILE_PRETEXT_START% ..
%BODY_LINK_FILE_PRETEXT_END%
Defines a section of HTML that is included in a BODY link before the link text if the link is to a file.
%BODY_LINK_FILE_POSTTEXT_START% ..
%BODY_LINK_FILE_POSTTEXT_END%
Defines a section of HTML that is included in a BODY link after the link text if the link is to a file.
%BODY_LINK_DIR_ATTR_START% ..
%BODY_LINK_DIR_ATTR_END%
Defines a section of HTML that is included in a BODY link attribute if the link is to a folder.
%BODY_LINK_DIR_PRETEXT_START% ..
%BODY_LINK_DIR_PRETEXT_END%
Defines a section of HTML that is included in a BODY link before the link text if the link is to a folder.
%BODY_LINK_DIR_POSTTEXT_START% ..
%BODY_LINK_DIR_POSTTEXT_END%
Defines a section of HTML that is included in a BODY link after the link text if the link is to a folder.
%BRAND% The license holder brand name (or phdcc). Required in all templates except when used by Consultant Subscription license holders.
%TEST_CODE:filename Used in Test Mode to include the specified file (from the template directory).
%TEST_LINK:filename Used in Test Mode to include the specified file (from the template directory) as the code for each link

Body links

The bulk of the code generated by Conference-CD-Wizard replaces the %BODY% template variable.

For the Contents and Index pages, the generated body code consists of a series of links. A basic link to a file looks like this:

<A HREF="alink.doc">link_name</A><P>

Because these links are of crucial importance to the generated output, the template lets you enhance them using the various template variable sections %BODY_LINK_FILE_ATTR_START% etc. The text sections are inserted into the basic link as illustrated by the followed pseudo-example for file links:

<A HREF="alink.doc" %BODY_LINK_FILE_ATTR%>%BODY_LINK_FILE_PRETEXT%link_name%BODY_LINK_FILE_POSTTEXT%</A><P>

Contact details template variables

The following template variables are used in the Contact details template contact.htt2:

%CONTACT_EMAIL_ADDRESS% The contact email address
%CONTACT_EMAIL_SUBJECT% The contact email subject
%CONTACT_DETAILS% The contact details
CR-LFs in the contact details are replaced with <BR>

README.TXT template variables

The following template variables cen be used in the README.TXT template readme.htt2: %PROJECT_NAME%, %CONFCDVERSION%, %DATE%, %CONTACT_EMAIL_ADDRESS%, %CONTACT_EMAIL_SUBJECT%, %CONTACT_DETAILS%

Template wrapping web page

This feature lets you write a web page but have it appear within the current template.

Write your web page in the source folder. All markup and text between the <BODY> and </BODY> tags is removed from the source file and inserted in the template to replace the %BODY% template variable.

If you want a page to be wrapped then you must insert a META CONFCDWRAP header tag, eg:

<META name="CONFCDWRAP" content="body">
The "content" value is ignored at the moment.

The only other header fields recognised are the page title and character set. All other header text is ignored and not copied to the CD burn folder.

Supplied template description

BasicRed
basic.httTemplate
basic.cssStylesheet
basic.jsJavaScript
basicbck.jpgPage body background: repeat-x4x1000Floodfill 0-50 linear gradient 180° PaintShopPro
basic2.gifConference-CD logo90x99
basicl.jpgBackground image in footer table cells: repeat-y1000x4
basicblo.gifHeading button unselected94x30
basicbhi.gifHeading button selected94x30
basicup.gifFile link unselected16x16
basicdn.gifFile link selected16x16
basicfup.gifFolder link unselected16x16
basicfdn.gifFolder link selected16x16
thumb.bmpPreview thumprint200x115