Creating a Template

A new template can be created by going to the Elements option from the dashboard and selecting the create Template icon.

New Template Icon

Each template in the system requires a name, the name will be visible when working with documents and is how you will select the template to use for the document, you can have a different template for each and every document if required. For this example enter template1 in the Template Name.

The Theme drop down lets you place the template into a specific theme while the Category drop down allows you to group like elements together. Categories have no function other than to group elements to make them easier to work with. The description filed takes a description of the template, the description does not get used by the system.

The final field is the Template (HTML) field, this takes the HTML that makes up the template for the web page, fill this field with the following HTML.

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>[[+meta_title]]</title>
	<base href="[[+siteuri]]" />
</head>
<body>
	<h1>[[+title]]</h1>
	[[+content]]
</body>
</html>

The CSS for the template can be placed in a document that has its type set to CSS and can be included with:

<link href="[[~4]]" rel="stylesheet" type="text/css" />

Where [[~4]] is the id of the document holding the CSS for the site. For CSS to be served from a document the document must use a blank template, that is one that contains nothing but the [[+content]] placeholder.

The alternative is to place the CSS in a .css file and reference it as you normally would. The file can be placed anywhere in your web space by using your FTP client.

Once all fields have been completed simply click Create Template to create the new template.

The new template can be used for a document by returning to the dashboard, selecting Documents, selecting the document to change the template for and then selecting the new template from the Template drop down.




TOP