aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-24 01:13:37 -0400
committerJoey Hess <joey@kitenet.net>2010-04-24 01:13:37 -0400
commitc0b2334815303d4dc2fdf0b22dff12085671c8d8 (patch)
tree7ea1ef6b6eab59db1e93425cc92782108d6c8e91
parent998f47ed137959d0a0951368d8d0f891673c3ce5 (diff)
downloadikiwiki-c0b2334815303d4dc2fdf0b22dff12085671c8d8.tar
ikiwiki-c0b2334815303d4dc2fdf0b22dff12085671c8d8.tar.gz
reword, reorg, add example
-rw-r--r--doc/templates.mdwn26
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/templates.mdwn b/doc/templates.mdwn
index c91037670..0e54ae8a0 100644
--- a/doc/templates.mdwn
+++ b/doc/templates.mdwn
@@ -2,7 +2,7 @@
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,
filled out and inserted into other pages in the wiki.
@@ -12,21 +12,32 @@ filled out and inserted into other pages in the wiki.
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.
@@ -58,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;