Extension:Call

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Call

Release status: stable

Implementation Special page
Description Create a hyperlink to a template (or to a normal wiki article) with parameter passing. Can be used at the browser's command line or within wiki text.
Author(s) Algorithmix
Version 1.0 (2007-12-20)
MediaWiki 1.7 and later
Download from DPL website and from svn
Parameters the article name and an arbitrary set of parameters
Example on dpldemo website

[edit] Purpose

With the Call-extension you can create dynamic wiki pages by passing parameters. Write something like

 [[Special:Call/MyTemplate,size=big,color=green,good morning!]]
 [[Special:Call/:MyArticle,size=big,color=green]]

in a wiki article or type

 http://mywiki/index.php?title=Special:Call/MyTemplate,size=big,color=green,hello!
 http://mywiki/index.php?title=Special:Call/MyTemplate&size=big&color=green,nice day
 http://mywiki/index.php?title=Special:Call/:MyArticle,size=big,color=green,see you later.
 http://mywiki/index.php?title=Special:Call/:MyArticle&size=big&color=blue&good night!

Within template 'MyTemplate' or within article 'MyArticle' you reference parameters (by name or number) in the normal way:

 ... arbitrary text ...
                 {{{1|}}}
                 Size is {{{size}}}, using {{{color}}} color.
 ... arbitrary text ...

Why should one do this?

  • Think of a 'menu page' where the user selects an option and you want to forward him to a wiki page depending on that option.
  • Did you develop a wiki template? Call it directly from the browser copmmand line and pass parameters to test it.
  • Think of an article which contains a form (combo boxes, user input fields). Once the user has filled in the form you perform the desired action and then call the same article again so that the user can modify his input and try a second time (a good example for this technique can be found on the dpldemo website.

[edit] Related extensions

Personal tools