1 Date: Sat, 10 Sep 2005 21:42:11 +0100
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.11)
3 X-Rcs-Id: $Id: Help%2FTemplatePlugin,v 1.1 2005-11-21 22:19:00 rurban Exp $
4 Content-Type: application/x-phpwiki;
5 pagename=Help%2FTemplatePlugin;
6 pgsrc_version="1 $Revision: 1.1 $";
10 Content-Transfer-Encoding: binary
14 Template = Parametrized blocks.
16 Include text from a wiki page and replace certain placeholders by parameters.
17 Similiar to CreatePage with the template argument, but at run-time.
18 Similiar to the mediawiki templates but not with the "|" parameter seperator.
22 <?plugin Template page=Templates/Footer?>
23 <?plugin Template page=Templates/Film vars="title=SomeFilm&year=1999" ?>
24 {{Templates/Film|title=SomeFilm|year=1999}}
34 pagename to be included as template
38 optional parameters to be expanded inside the template
40 ! Parameter expansion:
41 vars="var1=value1&var2=value2"
43 We only support named parameters, not numbered ones as in mediawiki, and
44 the placeholder is %%var%% and not {{~{var~}}} as in mediawiki.
46 The following predefined variables are automatically expanded if existing:
49 mtime - last modified date + time
50 ctime - creation date + time
53 creator - first author
54 SERVER_URL, DATA_PATH, SCRIPT_NAME, PHPWIKI_BASE_URL and BASE_URL
57 <noinclude> .. </noinclude> is stripped
60 * ENABLE_MARKUP_TEMPLATE = true: (lib/InlineParser.php)
61 Support a mediawiki-style syntax extension which maps
63 {{TemplateFilm|title=Some Good Film|year=1999}}
67 <?plugin Template page=TemplateFilm vars="title=Some Good Film&year=1999" ?>
73 <?plugin Template page=TemplateExample vars="title=TestTitle" ?>
77 <?plugin Template page=TemplateExample vars="title=TestTitle" ?>
80 {{TemplateExample|title=TestTitle}}
83 PhpWikiDocumentation Help:WikiPlugin