Templates are used by Coranto profiles to create a complete static page. The template is used as a wrapper around the file created when the items selected by the profiles settings are processed using the style set for that profile.

The template usually has some html code that precedes the spot where the text file should be inserted. The entire text file is inserted in place of:

<Field: Content>

and then the remainder of the html making up a complete and valid web page follows.

↑ Contents

Sample Template Code

This is a very simple template to create a webpage:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


	<title><Field: Title></title>

<Field: Content>


Template Tags

There are only two tags that work in templates:

<Field: Title>
<Field: Content>

All of the other Coranto tags are not processed in the template, but in the style.

↑ Contents

Why Use Templates

The Coranto tag <Field: Title> tag will be replaced by text specified in the profile settings. The <Field: Content> tag will be replaced by the contents of the file created from the style output. This results in a complete file that does not require any additional calls to the server, reducing server load.

Static pages reduce server load because no SSI or other calls are made when the page is loaded. In addition a static page will still exist even if the Coranto script is disabled - so it acts as a backup for your content.

↑ Contents

Editing Templates

Templates can not be edited from within the Coranto interface on a default installation. Each template is a separate file that you have to edit with a text editor unless you install the Template Editor addon. This addon allows you to edit your templates from the Coranto interface.

Further Reading

Coranto tutorial part 3 - Profiles, styles and templates - by SrNupsen
How Coranto Works - by Sumaleth

↑ Contents

Page last modified on February 02, 2009, at 07:30 AM