1 Date: Thu, 26 Mar 2009 11:34:32 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
4 Content-Type: application/x-phpwiki;
5 pagename=Help%2FTemplatePlugin;
9 Content-Transfer-Encoding: binary
11 The **Template** [[Help:WikiPlugin|plugin]] allows to include text from a wiki page and replace certain placeholders by parameters.
13 A template can be seen as a parametrized block. It is similiar to [[CreatePage]] with the template argument, but at run-time.
15 There are two syntaxes to call a template, the usual Phpwiki syntax for plugins, and a more
16 concise syntax similar to Mediawiki templates.
20 === Without parameters
24 <<Template page=Footer>>
36 <<Template page=Film vars="title=SomeFilm&year=1999">>
41 {{Film|title=SomeFilm|year=1999}}
44 === With a specific revision of the page
48 <<Template page=somepage rev=5>>
53 {{somepage?version=5}}
65 | pagename to be included as template
69 | optional parameters to be expanded inside the template
74 | most recent revision
77 | just include a named section
81 | when including a named section show the heading
85 === Parameter expansion
87 We only support named parameters, not numbered ones as in Mediawiki, and
88 the placeholder is %%var%% and not ~{~{~{var~}~}~} as in Mediawiki.
91 vars="var1=value1&var2=value2"
94 The following predefined variables are automatically expanded if existing:
104 | last modified date + time
107 | creation date + time
136 ~<noinclude> .. ~</noinclude> is stripped.
138 ~<includeonly> .. ~</includeonly> is only expanded in pages using the template, not in the template itself.
142 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]