1 [[Ikiwiki]] uses many templates for many purposes. By editing its templates,
2 you can fully customise this site.
4 [[!if test="enabled(template)" then="""
5 ## The template directive
7 The template directive allows wiki pages to be used as templates.
8 These templates can be filled out and inserted into other pages in the
9 wiki using the directive.
11 [[!if test="enabled(template) and enabled(inline)" then="""
12 [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes
13 sort=title template=titlepage
14 rootpage=templates postformtext="Add a new template named:"]]
17 [[!if test="enabled(edittemplate)" then="""
18 ## The edittemplate directive
20 The edittemplate directive can be used to make new pages default to
21 containing text from a template, which can be filled as out the page is
27 These templates are used to build the wiki. The aim is to keep almost all
28 html out of ikiwiki and in the templates.
30 * `page.tmpl` - Used for displaying all regular wiki pages.
31 * `misc.tmpl` - Generic template used for any page that doesn't
32 have a custom template.
33 * `editpage.tmpl` - Create/edit page.
34 * `change.tmpl` - Used to create a page describing a change made to the wiki.
35 * `passwordmail.tmpl` - Not a html template, this is used to
36 generate a mail with an url the user can use to reset their password.
37 * `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]].
38 * `rssitem.tmpl` - Used for generating individual items on rss feeds.
39 * `atompage.tmpl` - Used for generating atom feeds for blogs.
40 * `atomitem.tmpl` - Used for generating individual items on atom feeds.
41 * `inlinepage.tmpl` - Used for adding a page inline in a blog
43 * `archivepage.tmpl` - Used for listing a page in a blog archive page.
44 * `microblog.tmpl` - Used for showing a microblogging post inline.
45 * `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links)
46 * `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used.
47 * `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create
49 * `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search
51 * `searchquery.tmpl` - This is an omega template, used by the
52 [[plugins/search]] plugin.
53 * `comment.tmpl` - This template is used to display a comment
54 by the [[plugins/comments]] plugin.
55 * `editcomment.tmpl` - This template is the comment post form for the
56 [[plugins/comments]] plugin.
57 * `commentmoderation.tmpl` - This template is used to produce the comment
59 * `recentchanges.tmpl` - This template is used for listing a change
60 on the RecentChanges page.
62 [[!if test="enabled(pagetemplate)" then="""
63 ## The pagetemplate directive
65 The pagetemplate directive can allow individual pages to use a
66 different template than `page.tmpl`.
71 Templates are located in `/usr/share/ikiwiki/templates` by default;
72 the `templatedir` setting can be used to make another directory be
73 searched first. Customized templates can also be placed inside the
74 "templates/" directory in your wiki's source.
78 Ikiwiki uses the HTML::Template module as its template engine. This
79 supports things like conditionals and loops in templates and is pretty easy
80 to learn. All you really need to know are a few things:
82 * To insert the value of a template variable, use `<TMPL_VAR variable>`.
83 * To make a block of text conditional on a variable being set use
84 `<TMPL_IF NAME="variable">text</TMPL_IF>`.
85 * To use one block of text if a variable is set and a second if it's not,
86 use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>`
88 [[!meta robots="noindex, follow"]]