Extension:Call

From MediaWiki.org

Jump to: navigation, search

             

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
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
Last Version  1.2 (2009-05-27)
MediaWiki  1.7 and later
License No license specified
Download Download snapshot

Subversion [Help]
Browse source code

Example  on dpldemo website

check usage (experimental)

[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 command 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