- use templates for signin form, error messages
[ikiwiki.git] / doc / templates.mdwn
1 ikiwiki uses the HTML::Template module as its template engine. This
2 supports things like conditionals and loops in templates and is pretty easy
3 to learn.
4
5 It ships with some basic templates which can be customised:
6
7 * `templates/page.tmpl` - Used for displaying all regular wiki pages.
8 * `templates/misc.tmpl` - Generic template used for any page that doesn't
9   have a custom template.
10 * `templates/recentchanges.tmpl` - Used for the RecentChanges page.
11 * `templates/editpage.tmpl' - Create/edit page.
12
13 If you like, you can add these to further customise it:
14
15 * `templates/signin.tmpl` - If it exists, it is used for customising the
16   layout of the SignIn form and all assciated forms. The misc.tmpl is
17   wrapped around this, so it should only be a template for the form.
18   
19   Note that the SignIn form is implemented using CGI::FormBuilder, which
20   interfaces to HTML::Template, so not all of it can be customised with
21   templates, although most of it can, by creating this template. Without
22   the template, CGI::FormBuilder creates the page body by itself.
23
24 I aim to keep almost all html out of ikiwiki and in the templates.