| iStrip themes |
|---|
|
[ Back to top ]
| Preamble |
|---|
| This document aims to cover the basics of installing and using iStrip themes. For more details on editing and creating the template files that make up themes, see the documentation on template building and template variables |
[ Back to top ]
| Old templates |
|---|
| For the purpose of the following discussion, all versions
of iStrip prior to 1.2.0 are considered old. Old versions of iStrip utilized a basic template engine that did simple variable substitutions. From version 1.2.0 the Smarty code library is utilized to provide templates instead. This engine uses a syntax that is not compatible with the old template system. Furthermore, the names used for template variables are significantly different in order to organize them more sensibly. For these reasons you cannot use old templates with versions of iStrip that use Smarty. The old template system did not support looping, optional sections or default values. In order to achieve some looping functionality old versions of iStrip had some internal functions that would apply sub-templates to certain items of data and generate a simple template variable for use in the main template. This is no longer necessary as Smarty can do loops and conditionals in situ and so these sub-templates are now obsolete. The new format for variables and for loops and conditional blocks is described in the template building documentation. The changes in template variable name are listed in full in the template variable documentation, along with a list of depreciated variables. Consult these documents for information on how to rework your existing templates |
[ Back to top ]
| Constructing themes |
|---|
| A theme is a directory of template files and their associated
data, for example image files, CSS stylesheets, etc. A theme, at the very
least, must contain an index.tpl file for displaying the main page of your
site. The index.tpl file is the template iStrip will use by default to
generate your comic site home page. If a visitor tries to load a template
that isn't available then index.tpl will be loaded instead. The name that
iStrip will use for a theme is the name of the directory is stored in. In addition to the index.tpl file, the theme may also contain other templates for other pages, for example it may contain a characters.tpl file for a characters page, archive.tpl for a page that lists all the strips you have thus far posted, or any other page you would like to include on your site. These templates are allalso processed by the index.pho script and therefore all have the same template options available to them. See the documentation on template building and on template variables for more details on what features are available in template files used in your themes. If you intend to makes use of the component library then a theme may also have a subdirectory for the components that it uses. It is important that components are not stored in the root of the theme directory as it may make them available for visitors to view them directly, which could have unpredictable results. In fact, it is recommended that only the actual templates are kept in the root directory and that all other file types, such as components and images are stored in subdirectories. For more details on the component library see the template toolkit documentation. |
[ Back to top ]
[ Back to top ]
[ Back to top ]
Copyright © 2002, 2003 Gordon McVey