Related Topics
About customizing your web interface
FirstClass Internet Services comes with several standard sets of templates. These templates define the interface of your FirstClass environment when you log in through the web. If you do not wish to use these shipped template sets, you can customize, replace, or extend them to reflect the type and appearance of information that you want to serve out to your users.
If you want to make changes to the basic look and feel of your sites, you can use the .sitepref form. For example, you may choose to display different web interfaces, display different web site appearances, or change the colors and fonts (see About changing web site preferences).
The most common reason that you may want to customize web templates is if you wish to make radical changes to your site. For example, you may choose to create new form in FirstClass Designer and add the corresponding web template to the default template set (.Templates) in the Main Site folder. For information on
creating custom templates, read all of the documents in the Internet Services help category, Customizing your web interface.
If you support multiple web sites on your system, you can create unique templates to reflect this diversity. For example, if you have different sites for both your Sales and Engineering departments, you could create template sets that reflect the different perspectives of these departments. For information on creating web sites, see the About creating web sites.
Before you begin, you should be familiar with:
• FirstClass Internet Services
• your operating system
• basic HTML and a solid understanding of Internet Services script.
Creating custom forms and templates
You can create custom templates in different ways:
• copy an existing template into a FirstClass document or text editor, and customize the code
• create a new document in FirstClass or a text editor using HTML, JavaScript, and Internet Services script
• create a new form using FirstClass Designer, and save it as an HTML document).
Note
If you want to use custom forms for your web site, you must also create an HTML template of this form and place it in the appropriate template folder (see Where to put custom templates in the WWW folder).
In all cases, use Internet Services script to customize your templates. Internet Services script includes:
• commands
• functions.
Internet Services script works only in server-parsed files. Internet Services, as shipped, considers the following files to be server-parsed:
• files ending in .shtml, .shtm, .swml
• include files (.inc)
• templates (located in the Template Sets folder).
Where to put custom templates in the WWW folder
Put your custom templates in the current in the current template set folder, by default called .Templates, if you want them as your default web client interface.
When you are arranging your templates in the WWW folder, make sure the correct templates are in the correct folders and that your Multiple Sites & Languages form is correctly configured to reflect your site setup.
Coding conventions
We use certain coding conventions for menu items and variables in this document:
• text in italics indicates arguments, variables, or other information for which you must type your own value.
• items that appear inside square braces are optional
For example, [, msgboxtype], [stringexpression]
• curly braces and a bar (pipe |) indicate mandatory choices between a number of items
For example, {Goto label| Resume Next | Goto 0}
• code examples always appear in the Courier New font
Example: Sub Click()
StringField1002.SetFocus
End Sub
In FirstClass web templates, we use
• blue for all X-FC tags to differentiate them from static code or other Internet Services Script syntax
• magenta in the event that an X-FC tag uses embedded IS script
For example, <X-FC-FIELD `1000 + $INDEX` LONG>.
• red for server side include statements
For example, <!--#include virtual="/.templates/GlobalStyles.inc"--><!--#set var="COLOUR" value=".
• black for HTML or Javascript code
For example, <meta http-equiv="Content-Type" content="text/html;charset=<X-FC-CHARSET>">.
• green for comments.
For example, <!--#rem General Purpose Globals:...-->.
This color coding convention is just for convenience as it greatly improves the readability of the templates. Although not necessary, we recommend you follow this convention, as it greatly simplifies template debugging.
Note
X-FC tags and arguments are case insensitive.
|