From 62fc5d0c3cfdde0ae87c5364db6f6ebfa6794b14 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 15 Nov 2010 14:41:40 +0000 Subject: [PATCH] I totally misinterpreted what included() is supposed to be for. This reverts commit da9e1ea667f82d5fca9168dbed19be08040570ff --- doc/ikiwiki/directive/template.mdwn | 34 +++++++++++------------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index df391f99e..9e3ae54df 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -60,30 +60,22 @@ 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: - \[[!if test="included()" then=""" - - Name: \[[]]
- Age:
- - Favorite color:
- - No favorite color.
-
- -
- -
-
- """ else=""" - This is a template page. - """]] + + Name: \[[]]
+ Age:
+ + Favorite color:
+ + No favorite color.
+
+ +
+ +
+
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