diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn
index 9e3ae54df..df391f99e 100644
--- a/doc/ikiwiki/directive/template.mdwn
+++ b/doc/ikiwiki/directive/template.mdwn
@@ -60,22 +60,30 @@ few things:
`text`.
* To use one block of text if a variable is set and a second if it's not,
use `textother text`
+* Each template file included in the wiki's source will also generate a regular
+ wiki page. In many cases you might want to prevent some of your template
+ being interpreted for the regular page. Use the [[if]] directive with the
+ `included()` test to guard the template code.
Here's a sample template:
-
- Name: \[[]]
- Age:
-
- Favorite color:
-
- No favorite color.
-
-
-
-
-
-
+ \[[!if test="included()" then="""
+
+ Name: \[[]]
+ Age:
+
+ Favorite color:
+
+ No favorite color.
+
+
+
+
+
+
+ """ else="""
+ This is a template page.
+ """]]
The filled out template will be formatted the same as the rest of the page
that contains it, so you can include WikiLinks and all other forms of wiki