From: http://jmtd.livejournal.com/ Date: Mon, 15 Nov 2010 14:41:40 +0000 (+0000) Subject: I totally misinterpreted what included() is supposed to be for. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/62fc5d0c3cfdde0ae87c5364db6f6ebfa6794b14 I totally misinterpreted what included() is supposed to be for. This reverts commit da9e1ea667f82d5fca9168dbed19be08040570ff --- 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