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.
There are two types of template:
Evaluation and Standard license holders can only use template archives.
- Template archives: the template and all supporting files are stored in a single
.httsfile (that cannot be changed), eg
BasicRed.htts. Only phdcc can make template archives.
- Ordinary template: the template and supporting files are stored as normal files (and so can be changed). The primary template is an
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.
A template consists of a primary template
.httfile and any other support files that it needs, eg stylesheets and images.
However all templates share a few support template
.htt2files. 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
- The Search page includes template file
searchen.htt2that defines the search page body.
- The Contact details page includes template file
contact.htt2that defines the contact details and email form.
- The help page includes template file
info.htt2that defines the help page body.
- The root README.TXT file is based on template file
- The root index.html and aGoodPlaceToStart.htm files are based on template file
start.htt2; the supplied file redirects the browser to the main CD start page confcd.htm.
confcdlogo.bmp- this is the default image shown by the ConfCDGo program when the CD AutoRuns in Windows.
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">
The output files are always HTML. The following files are generated:
- Folder contents (
confcd.htmin each folder)
- Alphabetic index (
- Search (
- Contact (
- Help (
- In addition, the template is wrapped around the body of any existing web pages that contain META CONFCDWRAP
CD images produced by Conference-CD-Wizard have a set structure.
In the supplied templates: In each folder, Conference-CD-Wizard includes file
- The source folders and files are copied to the image folder.
- A folder
confcdis generated containing:
- The Conference-CD runtime and configuration information
- Optional alphabetic index
- Optional search page and search database
- Optional contacts page
- Help page
- Template support files
- In each image folder, Conference-CD-Wizard generates a page called
confcd.htmcontaining the folder contents.
However, if the folder contains a web site then this page is not generated. A folder contains a web site if one of these files is found:
- In the image root, Conference-CD-Wizard generates an AutoRun file called
- In the image root, Conference-CD-Wizard generates
aGoodPlaceToStart.htmif these files do not already exist, ie copied from the source root folder.
intro.htt(if it exists) before the main body of the page. This file must be in UTF-8 format.
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
.httfile 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:
- 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
confcdfolder. 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.
- 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
<!-- BMP file thumbprint: thumb.bmp -->
Conference-CD-Wizard can generate output based on the template in many folders. However the template support files are always in the image
To ensure that the generated file correctly refers to a support file, precede the support filename by
%PATHBACK%template variable (defined below) is the path back to the CD image root. The following
confcd/then takes you to the image
confcdfolder. For example, here's show to refer to an image:
If you use a stylesheet .css file in your template, then this file exists in the
confcdfolder. The .css file should not use %PATHBACK% to refer to files.
A template must contain template variables to instruct Conference-CD-Wizard. Template variables have various uses:
- The variable is replaced with HTML generated by Conference-CD-Wizard.
- The %INCLUDE:filename% variable is replaced by the contents of filename
- Two variables demarcate a section of HTML that Conference-CD-Wizard may or may not include in the generated output. (The variables themselves are always removed.)
- Two variables demarcate a section of HTML that Conference-CD-Wizard uses later on while generating other output. (The variables and the code section are always removed from where they are defined.)
%BODY% The main body of the generated page %DESCRIPTION% The folder name (
Homefor 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:
%SEARCH_START% ..%SEARCH_END% Defines a section of HTML that is included if the project includes a search. The HTML must provide this link:
%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:
%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
The bulk of the code generated by Conference-CD-Wizard replaces the
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:
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>
The following template variables are used in the Contact details template
%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>
The following template variables cen be used in the README.TXT template
%PROJECT_NAME%, %CONFCDVERSION%, %DATE%, %CONTACT_EMAIL_ADDRESS%, %CONTACT_EMAIL_SUBJECT%, %CONTACT_DETAILS%
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:The "content" value is ignored at the moment.
<META name="CONFCDWRAP" content="body">
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.