Templates and Themes

Themes

Themes can be created using a CSS framework and uploaded as packed ZIP files, clearFusionCMS currently supports the following CSS frameworks:

Themes can be uploaded and selected by using the Set Theme option on the dashboard. If the theme has child themes then the child theme can also be selected.

When a theme is enabled the CSS framework it uses is taken into account and installed module adapt their output to be compatible.

What is a Template

Templates can be thought of as specialized chunks, they are simply the HTML that defines the page layout. chunks and snippets can be used within templates, simply place them where required, when a document using the template is rendered the chunks and snippets will automatically be pulled into the template and become part of the output.

The placeholder [[+content]] should be placed in the template at the location where the document content is to be rendered. The following is a minimal template:

<!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>

Other placeholders available for use can be found in the Placeholders document.

A theme consists of at least one template.

Child Themes

Child Themes allow chunks and templates to be created for special events e.g. Christmas, the theme can then be enabled for the season and then simply switched off or another theme enabled. It means you don’t have to modify the site templates each time you offer sales you simply switch to your sales theme and back to normal when it's finished no more waiting for your web master to update the site.

Themes use the base templates and chunks if there is no specific chunk or template designed for the theme this automatic reuse keeps the work required to add themes to a minimum, for example the sales theme may only require a different header for the pages and so only requires the designed to create two headers for the site and only one extra header will need to be coded into HTML.

CSS Framework

If no theme is currently selected then the CSS framework being used can be selected from the Set Theme dashboard option. The CSS Framework selector is used to control the output of modules so that they are compatible with the framework the site is being developed in.




TOP