API:Expandtemplates

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki API documentation.
MediaWiki API

Quick overview:

v · d · e

Prefix: None Required Rights: None POST Only? No

This module expands all templates in the wikitext.

Parameters[edit | edit source]

  • title – Title of page.
  • text – Wikitext to convert. Type: string
  • prop – Which pieces of information to get. A pipe character | separated list containing one or more of the following options:
    • wikitext – The expanded wikitext.
    • categories – Any categories present in the input that are not represented in the wikitext output.
    • volatile – Whether the output is volatile and should not be reused elsewhere within the page.
    • parsetree – The XML parse tree of the input.
    Note that if prop is not set, the result will contain the wikitext, but the output will be in a deprecated format.
  • includecomments – Whether to include HTML comments in the output. Type: bool
  • generatexml – Generate XML parse tree. Deprecated; use prop=parsetree instead. Type: bool


Errors Codes[edit | edit source]

  • readapidenied – You need read permission to use this module.

Example[edit | edit source]

Expand the Project:Sandbox template.

See also[edit | edit source]