]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/templates.mdwn
reword, reorg, add example
[ikiwiki.git] / doc / templates.mdwn
index 7b56600d10b070092f87cb8145292ecafdc4b23d..0e54ae8a0840a4cdfd85bf889dae8c77a80a9671 100644 (file)
@@ -2,32 +2,42 @@
 you can fully customise this site.
 
 [[!if test="enabled(template)" then="""
-## The template directive
+## template pages
 
-The template directive allows wiki pages to be used as templates.
-These templates can be filled out and inserted into other pages in the
-wiki using the directive.
+The template directive allows wiki pages to be used as templates,
+filled out and inserted into other pages in the wiki.
 """]]
 [[!if test="enabled(template) and enabled(inline)" then="""
 [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes
 sort=title template=titlepage
 rootpage=templates postformtext="Add a new template named:"]]
 """]]
+[[!if test="enabled(template)" then="""
+[[!template id=note text="This note box is built using the
+[[note]] template!"]]
+[[!template id=popup mouseover="popup example" popup="This popup is built using
+the [[popup]] template!"]]
+"""]]
 
 [[!if test="enabled(edittemplate)" then="""
-## The edittemplate directive
+## edit templates
 
 The edittemplate directive can be used to make new pages default to
 containing text from a template, which can be filled as out the page is
 edited.
 """]]
 
-## Wiki templates
+## wiki templates
 
 These templates are used to build the wiki. The aim is to keep almost all
 html out of ikiwiki and in the templates.
 
-* `page.tmpl` - Used for displaying all regular wiki pages.
+* `page.tmpl` - Used for displaying all regular wiki pages. This is the
+  key template customize.
+[[!if test="enabled(pagetemplate)" then="""
+  (The pagetemplate directive can be used to make a page use a
+  different template than `page.tmpl`.)
+"""]]
 * `misc.tmpl` - Generic template used for any page that doesn't
   have a custom template.
 * `rsspage.tmpl` - Used for generating rss feeds for blogs.
@@ -59,13 +69,6 @@ html out of ikiwiki and in the templates.
   `passwordmail.tmpl` - Parts of ikiwiki's user interface; do not
   normally need to be customised.
 
-[[!if test="enabled(pagetemplate)" then="""
-## The pagetemplate directive
-
-The pagetemplate directive can allow individual pages to use a
-different template than `page.tmpl`.
-"""]]
-
 ## Template locations
 
 Templates are located in `/usr/share/ikiwiki/templates` by default;