1 [[Ikiwiki]] uses many templates for many purposes. By editing its templates,
2 you can fully customise its appearance, and avoid duplicate content.
4 Ikiwiki uses the HTML::Template module as its template engine. This
5 supports things like conditionals and loops in templates and is pretty
6 easy to learn. All you really need to know to modify templates is this:
8 * To insert the value of a template variable, use `<TMPL_VAR variable>`.
9 * To make a block of text conditional on a variable being set use
10 `<TMPL_IF variable>text</TMPL_IF>`.
11 * To use one block of text if a variable is set and a second if it's not,
12 use `<TMPL_IF variable>text<TMPL_ELSE>other text</TMPL_IF>`
14 [[!if test="enabled(template) or enabled(edittemplate)" then="""
17 Template pages are regular wiki pages that are used as templates for other
21 [[!if test="enabled(template)" then="""
22 The [[!iki ikiwiki/directive/template desc="template directive"]] allows
23 template pages to be filled out and inserted into other pages in the wiki.
26 [[!if test="enabled(edittemplate)" then="""
27 The [[!iki ikiwiki/directive/edittemplate desc="edittemplate directive"]] can
28 be used to make new pages default to containing text from a template
29 page, which can be filled out as the page is edited.
32 [[!if test="(enabled(template) or enabled(edittemplate))
33 and enabled(inline)" then="""
34 These template pages are currently available:
36 [[!inline pages="templates/* and !*.tmpl and !templates/*/* and !*/discussion"
37 feeds=no archive=yes sort=title template=titlepage
38 rootpage=templates postformtext="Add a new template page named:"]]
43 Template files are unlike template pages in that they have the extension
44 `.tmpl`. Template files are used extensively by Ikiwiki to generate html.
45 They can contain html that would not normally be allowed on a wiki page.
47 Template files are located in `/usr/share/ikiwiki/templates` by default;
48 the `templatedir` setting can be used to make another directory be
49 searched first. Customised template files can also be placed inside the
50 "templates/" directory in your wiki's source -- files placed there override
51 ones in the `templatedir`.
53 Here is a full list of the template files used:
55 * `page.tmpl` - Used for displaying all regular wiki pages. This is the
56 key template to customise to change the look and feel of Ikiwiki.
57 [[!if test="enabled(pagetemplate)" then="""
58 (The [[!iki ikiwiki/directive/pagetemplate desc="pagetemplate directive"]]
59 can be used to make a page use a different template than `page.tmpl`.)"""]]
60 * `rsspage.tmpl` - Used for generating rss feeds for blogs.
61 * `rssitem.tmpl` - Used for generating individual items on rss feeds.
62 * `atompage.tmpl` - Used for generating atom feeds for blogs.
63 * `atomitem.tmpl` - Used for generating individual items on atom feeds.
64 * `inlinepage.tmpl` - Used for displaying a post in a blog.
65 * `archivepage.tmpl` - Used for listing a page in a blog archive page.
66 * `titlepage.tmpl` - Used for listing a page by title in a blog archive page.
67 * `microblog.tmpl` - Used for showing a microblogging post inline.
68 * `blogpost.tmpl` - Used for a form to add a post to a blog (and rss/atom links)
69 * `feedlink.tmpl` - Used to add rss/atom links if `blogpost.tmpl` is not used.
70 * `aggregatepost.tmpl` - Used by the aggregate plugin to create
72 * `searchform.tmpl`, `googleform.tmpl` - Used by the search plugin
73 and google plugin to add search forms to wiki pages.
74 * `searchquery.tmpl` - This is a Omega template, used by the
76 * `comment.tmpl` - Used by the comments plugin to display a comment.
77 * `change.tmpl` - Used to create a page describing a change made to the wiki.
78 * `recentchanges.tmpl` - Used for listing a change on the RecentChanges page.
79 * `autoindex.tmpl` - Filled in by the autoindex plugin to make index pages.
80 * `autotag.tmpl` - Filled in by the tag plugin to make tag pages.
81 * `calendarmonth.tmpl`, `calendaryear.tmpl` - Used by ikiwiki-calendar to
82 make calendar archive pages.
83 * `editpage.tmpl`, `editconflict.tmpl`, `editcreationconflict.tmpl`,
84 `editfailedsave.tmpl`, `editpagegone.tmpl`, `pocreatepage.tmpl`,
85 `editcomment.tmpl` `commentmoderation.tmpl`, `renamesummary.tmpl`,
86 `passwordmail.tmpl`, `openid-selector.tmpl`, `revert.tmpl` - Parts of ikiwiki's user
87 interface; do not normally need to be customised.
89 [[!meta robots="noindex, follow"]]