Update of /cvsroot/phpwiki/phpwiki/pgsrc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26546
Modified Files:
Help%2FTemplatePlugin
Log Message:
Reorder documentation
Index: Help%2FTemplatePlugin
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/pgsrc/Help%2FTemplatePlugin,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -2 -b -p -d -r1.3 -r1.4
--- Help%2FTemplatePlugin 18 Jun 2008 01:12:39 -0000 1.3
+++ Help%2FTemplatePlugin 3 Aug 2008 16:46:12 -0000 1.4
@@ -1,3 +1,3 @@
-Date: Mon, 16 Jun 2008 14:15:24 +0000
+Date: Sat, 2 Aug 2008 14:15:24 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
X-Rcs-Id: $Id$
@@ -12,6 +12,6 @@ Template = Parametrized blocks.
Include text from a wiki page and replace certain placeholders by parameters.
-Similiar to CreatePage with the template argument, but at run-time.
-Similiar to the mediawiki templates but not with the "|" parameter seperator.
+Similiar to [CreatePage] with the template argument, but at run-time.
+Similiar to the Mediawiki templates but not with the "|" parameter seperator.
!!! Usage
@@ -23,4 +23,13 @@ Similiar to the mediawiki templates but
</verbatim>
+If ENABLE_MARKUP_TEMPLATE is true, we support a Mediawiki-style syntax extension which maps
+<verbatim>
+ {{TemplateFilm|title=Some Good Film|year=1999}}
+</verbatim>
+ to
+<verbatim>
+ <?plugin Template page=TemplateFilm vars="title=Some Good Film&year=1999" ?>
+</verbatim>
+
!!! Arguments
@@ -37,46 +46,63 @@ vars|
optional parameters to be expanded inside the template
-!! Parameter expansion:
+!! Parameter expansion
+
vars="var1=value1&var2=value2"
-We only support named parameters, not numbered ones as in mediawiki, and
-the placeholder is %%var%% and not {{~{var~}}} as in mediawiki.
+We only support named parameters, not numbered ones as in Mediawiki, and
+the placeholder is %%var%% and not ~{~{~{var~}~}~} as in Mediawiki.
The following predefined variables are automatically expanded if existing:
-<verbatim>
- pagename
- mtime - last modified date + time
- ctime - creation date + time
- author - last author
- owner
- creator - first author
- SERVER_URL, DATA_PATH, SCRIPT_NAME, PHPWIKI_BASE_URL and BASE_URL
-</verbatim>
-<noinclude> .. </noinclude> is stripped
+pagename|
+ %%%
-!! In work
+mtime|
+ last modified date + time
-* ENABLE_MARKUP_TEMPLATE = true: (lib/InlineParser.php)
- Support a Mediawiki-style syntax extension which maps
-<verbatim>
- {{TemplateFilm|title=Some Good Film|year=1999}}
-</verbatim>
- to
-<verbatim>
- <?plugin Template page=TemplateFilm vars="title=Some Good Film&year=1999" ?>
-</verbatim>
+ctime|
+ creation date + time
+
+author|
+ last author
+
+owner|
+ %%%
+
+creator|
+ first author
+
+SERVER_URL|
+ %%%
+
+DATA_PATH|
+ %%%
+
+SCRIPT_NAME|
+ %%%
+
+PHPWIKI_BASE_URL|
+ %%%
+
+BASE_URL|
+ %%%
+
+!!! Inclusion
+
+<noinclude> .. </noinclude> is stripped.
+
+<includeonly> .. </includeonly> is only expanded in pages using the template, not in the template itself.
!!! Examples
+Standard syntax:
<verbatim>
<?plugin Template page=TemplateExample vars="title=TestTitle" ?>
</verbatim>
-Standard syntax:
- <?plugin Template page=TemplateExample vars="title=TestTitle" ?>
-
Shorter syntax:
+<verbatim>
{{TemplateExample|title=TestTitle}}
+</verbatim>
----
|