Layout Customization

This article describes how you can customize the layout and create new template sets.

The script is template driven. That means you do not have to work with PHP source code in order to change the layout of the script.

Colors and fonts are controlled with CSS in the file /templates/default/style.css.

The template files (layout.tpl.html, comment.tpl.html) can be edited like normal HTML files. You can find those files in the folder /template/. The folder /default/ contains the front end layout.

It is important, that the replacement tags - {$txt_example}, {$other_example} - stay as they are. Otherwise the script will not work. Some HTML editors tend to alter the source code of an HTML. Please be careful.

You are free, of course, to move parts of the template files. For instance, if you wanted to move the comment form above the entries, you would have to edit the file /templates/default/comment.tpl.html. The comment form is marked with

<!-- Comment Form Start --> and <!-- Comment Form Start -->

Create New Template Set

In order to create a new template set, create a new folder (e.g. /my_design/) inside the directory /template/. Copy at least the files layout.tpl.html and style.css from the folder /default/ into your new folder. If you want to customize the complete page including the detail template, you have to copy the other files, too.

In order for the script to use the new layout you need to open the file index.php and add following line of code on top of the file, but below

<?php.

  define('C5T_ALTERNATIVE_TEMPLATE', 'my_design');

Important: Replace my_design with the name of your new layout folder.