View Source:
Help/TemplatePlugin
Note:
You are viewing an old revision of this page.
View the current version.
!! Synopsis 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. !! Usage <verbatim> <?plugin Template page=Templates/Footer?> <?plugin Template page=Templates/Film vars="title=SomeFilm&year=1999" ?> {{Templates/Film|title=SomeFilm|year=1999}} </verbatim> !! Plugin Arguments Argument| Default Value| Description page| (empty)| pagename to be included as template vars| (empty)| optional parameters to be expanded inside the template ! 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. 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 ! In work: * 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> !! Examples <verbatim> <?plugin Template page=TemplateExample vars="title=TestTitle" ?> </verbatim> Standard syntax: <?plugin Template page=TemplateExample vars="title=TestTitle" ?> Shorter syntax: {{TemplateExample|title=TestTitle}} ------------- PhpWikiDocumentation Help:WikiPlugin
BroadcastHistory
HomePage
How to use this Wiki
Adding Pages
List all Categories
Main Categories
CategoryWikiPlugin
CategoryActionPage
Search
Toolbox
Recent Changes
Recent New Pages
What links here
All pages
Recent Changes
Recent Changes Cached
Tape Cartridge History
Favorite Categories
WikiPlugin
(140)
ActionPage
(77)
InterWiki
(18)
InterWiki
(18)
View Page
View Source
History
Diff
Sign In