Template management
            Installation of templates
            Changing template
                Change template globally
                Change template per user
        Template file format
            File packaging
            Package contents
                info.txt
                Pages and Images
                .pod* Attribute files

 

Template management

Installation of templates

Go to the Site Admin page to install new templates. Just pick a template .zip file using the provided upload form and cklick "install template".

You may also update existing templates using this way provided that the version number of the template has been incremented.

Changing template

Change template globally

Once you've installed a new template you can use it. The available templates are listed in the template list. The template currently in use is marked with green color.

Click on the link "set default" for the template you want to be the new site default.

Change template per user

Each user has access to his profile. From the profile the user can also change the template to use.

This cannot be overridden by root or global settings.

Template file format

File packaging

The template must be packaged in a standard zip file. No directories are allowed inside the zip file.

Package contents

info.txt

The most important file of a template is the info.txt file. It contains directions for the template installer such as the name or version of the template.

The variables in the info.txt file are just option = value pairs. The following variables are required:

 name = Name of the template 

This is just the name of the template.

 version = 1.00 

The version number. If you are a template maintainer, keep in mind, that the version number must be numerically usable. So, don't use the usual version.major.minor syntax - this will not work.

Instead use the RCS numbering scheme, just a decimal number using the DOT as decimal separator.

 files = Loader, Page1, Page2 

This is a comma-separated list of all the pages of the template. Only the listed files will be installed. Other files not listed here will be ignored.

 images = image1.png, image2.png 

A list of images for the template, comma-separated too. The same as for files applies here: only the listed images will be installed.

 autoloader = Loader 

This is the most important variable. It tells podwiki which page of the template is the AutoLoader pager, thus the initial page which makes up the template. This page shall include the site headers, the stylesheet, content section and so on.

Pages and Images

Pages and images making the template must be part of the zip file. They will be installed the usual podwiki way: using RCS and file operations.

You are totally free how you design the template. But it is recommended that the template provides a good starting point for users using it. So it should contain a fairly complete admin page from which users get links to edit template files, internal admin links and the like. Look at the default DB_Admin? page for an example.

.pod* Attribute files

If the zip file contains any .pod* file, eg. .podattributes, the file will be evaluated and the production version of that file inside the podwiki data/ directory will be updated using those data.

Please be careful using this feature! The contents of a .pod* File must be valid perl code. Before packaging a template test the data validity of the file:

 perl -wc .podattributes 

This shall not produce any errors.

The files .podusers and .podgroups, if existent in a zip package will be ignored for security reasons.