Help:Creating a page on the fly

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins, Researchers +/-

Reasons for creating a page on the fly, instead of viewing a stored page include:

  • there are many potential versions
  • the page has to be up-to-date

For these reasons special pages are created on the fly. For ordinary pages the second aspect is taken care of: each time a page is viewed, the latest version of the templates and images is used, and the existence detection of linked pages is also up-to-date. If necessary "action=purge" can update the page.

However, there may be many potential versions of a page, with a small change in the wikitext making the page rendering sufficiently different to be separately of interest. It may be impractical or even impossible to store them all. In that case the preview function can be used, not as a check in preparation of storing the page, but as page creation feature by itself.

The small change with a large effect can be a change in image parameters, or a change in a template call: a change in the name or in the parameters.

Applications:

  • Changing a parser function call, e.g. making a change in a computation. Thus the wikitext {{#expr:11/7}} may well be preferable over 1.5714285714286. The expression not only gives insight in how the number was computed, but allows easy change of a parameter in the computation. Creating a page on the fly allows what-if analysis of the expression: "What happens to the result if we make a particular change to a parameter?". If the change of a parameter is small this is also called sensitivity analysis: "How sensitive is the result to a small change of a parameter?".
  • showing an image in a desired size
    • e.g. [[Image:Netherlands pol87.jpg|100px]] gives Netherlands pol87.jpg, change the "100" to show it enlarged, if desired even larger than the original (the maximum is browser-dependent; some browsers also allow enlargement independent of the wikitext and HTML; however, if the image is originally put on the page in reduced size, enlarging that with the browser gives less quality than embedding the image in the page in a less reduced size)
  • showing the existence of a list of pages, e.g. to check the existence of pages with the numbers 2000-2099, on the English Wikipedia, with w:Template:L2d, one can use {{l2d|20}}; for another 100 numbers, change the "20".
  • providing a list of links, e.g.:
    • {{</nowiki>Table of Wikimedia projects|Special:Allpages&from=&namespace=10}}; this gives for all projects a link to the page with a list of all templates; change the "10" to get links to all pages in another namespace. (To try it out, remove the first set of nowiki tags, not the second.)
    • Names in the language itself and in Dutch:

{{List of Languages|lang=nl}} gives:

+/-

  • Afrikaans (Afrikaans)
  • български (Bulgaars)
  • brezhoneg (Bretons)
  • čeština (Tjechisch)
  • dansk (Deens)
  • Deutsch (Duits)
  • Ελληνικά (Grieks)
  • English (Engels)
  • español (Spaans)
  • Esperanto (Esperanto)
  • فارسی (Perzisch)
  • français (Frans)
  • italiano (Italiaans)
  • 日本語 (Japans)
  • қазақша (Kazakstaans)
  • 한국어 (Koreaans)
  • Kurdî (Koerdisch)
  • Nederlands (Nederlands)
  • norsk (Noors)
  • polski (Pools)
  • português (Portugees)
  • русский (Russisch)
  • српски / srpski (Servisch)
  • svenska (Zweeds)
  • 中文 (Chinees)


+/-

Change the language code for another list (as far as data are available).


Unfortunately, when linking to a template instead of embedding it, transfer of parameters is not possible. Also, special input boxes cannot be created. Therefore, although the template hides most wikitext from the "previewer" (viewer/"semi-editor"), he/she has to deal with the template tag itself.