prefs page implemented
[ikiwiki] / 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 I aim to keep almost all html out of ikiwiki and in the templates.
6
7 It ships with some basic templates which can be customised:
8
9 * `templates/page.tmpl` - Used for displaying all regular wiki pages.
10 * `templates/misc.tmpl` - Generic template used for any page that doesn't
11   have a custom template.
12 * `templates/recentchanges.tmpl` - Used for the RecentChanges page.
13 * `templates/editpage.tmpl` - Create/edit page.
14 * `templates/passwordmail.tmpl` - Not a html template, this is used to
15   generate the mail with the user's password in it.
16
17 If you like, you can add these to further customise it:
18
19 * `templates/signin.tmpl` - If it exists, it is used for customising the
20   layout of the SignIn form and all assciated forms. The misc.tmpl is
21   wrapped around this, so it should only be a template for the form.
22 * `templates/prefs.tmpl` - If it exists, it is used for customising the
23   layout of the Prefs form and all assciated forms. The misc.tmpl is
24   wrapped around this, so it should only be a template for the form.
25   
26 Note that the SignIn and Prefs forms are implemented using
27 CGI::FormBuilder, which interfaces to HTML::Template, so not all of it can
28 be customised with templates, although most of it can, by creating these
29 templates. Without the templates, CGI::FormBuilder creates the page bodies
30 by itself.