Related Topics
Creating web templates
Customizing templates is an advanced task that requires a good working knowledge of the FirstClass client, FirstClass IS script, HTML, HTTP protocol, advanced Java script, and Cascading Style Sheets (CSS). You also need to understand the structure and components of web templates at the tag level. For a complete list of X-FC tags and Internet Services script, see IS script Library.
You can create web templates in one of two ways:
• use the Save as HTML feature in Designer on a form you have created
• use an HTML editor
If you use FirstClass Designer, it automatically creates HTML documents in both read only and editable formats. If you create a template in an HTML editor, and you want the template to be editable, you must manually create both the read only and editable templates. Regardless of how you create a web template, it must consist of a noneditable (read only) version and an editable version. Noneditable templates are named formid and editable templates are named Edit.formid.
Editable templates are usually larger and more complex than their corresponding read only counterparts, due to the extra embedded code to initiate specific actions. The graphic below shows a section of the read only and editable Message templates. The syntax circled in orange identifies the template on the right as editable:
(Double-click to enlarge)
Here are some examples of editable and noneditable templates:
• a Message template: 141 and Edit.141
When you create a New Message on the web, you are using the Edit.141 (editable) template. When your recipient reads the message, she is opening the 141 (noneditable) template.
• a Phone Call template: 128 and Edit.128
When you create a New Phone Call on the web to send a Called No message notification, you are using the Edit.128 (editable) template. When your recipient reads the phone message, she is opening the 128 (noneditable) template.
• a Personal Address template: 119 and Edit.119.
When you create a New Personal Address on the web, you are using the Edit.119 (editable) template. When you open this address on the web, you are opening the 119 (noneditable) template.
Look in your templates folders for other examples.
When a web user creates a new object (for example, a message or a document), the first thing Internet Services does is look for and retrieve the matching template form ID as its corresponding client form. If Internet Services cannot find a template that matches the form ID, it will load template 95 as the default. If Internet Services cannot find an editable template that matches the form ID of the object, it will load the read only version of that template.
In noneditable templates (read only), you can only view the document displayed, not edit any information. For example, when you receive an email message and open it, you can only read it. To edit the message, you must either reply to the message or forward it on to another user. When you perform this action, the displayed template becomes editable, since you are actually opening up the editable version of that same template.
|