MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:-{R|https://www.mediawiki.org/wiki/API:Main_page/zh}-

action=expandtemplates

main | expandtemplates

展开wiki文本中的所有模板。

参数:
title

页面标题。

text

要转换的wiki文本。

This parameter is required.
revid

修订版本ID,用于{{REVISIONID}}和类似变体。

Type: integer
prop

要获取的那条信息。

注意如果没有选定值,结果将包含wiki文本,但将以弃用的格式显示。

wikitext
展开后的wiki文本。
categories
任何在输出中提供的,未在wiki文本输出中表现的分类。
properties
由wiki文本中扩充的魔术字定义的页面属性。
volatile
输出是否常常变动,是否不应被在页面中其他任何位置重用。
ttl
结果缓存应无效化后的最长时间。
modules
任何解析器函数请求添加至输出的ResourceLoader模块。jsconfigvarsencodedjsconfigvars之一必须与modules共同被请求。
jsconfigvars
针对页面提供JavaScript配置变量。
encodedjsconfigvars
针对页面提供JavaScript配置变量为一个JSON字符串。
parsetree
输入的XML分析树。
值(以|替代物分隔):categories、encodedjsconfigvars、jsconfigvars、modules、parsetree、properties、ttl、volatile、wikitext
includecomments

输出时是否包含HTML注释。

Type: boolean (details)
generatexml
已弃用。

生成XML解析树(取代自prop=parsetree)。

Type: boolean (details)
templatesandboxprefix

模板沙盒前缀,与Special:TemplateSandbox一样。

通过|替代物隔开各值。
Maximum number of values is 50 (500 for clients allowed higher limits).
templatesandboxtitle

解析使用templatesandboxtext代替此处命名的页面内容的页面。

templatesandboxtext

解析使用此页面内容代替由templatesandboxtitle命名页面的页面。

templatesandboxcontentmodel

templatesandboxtext的内容模型。

以下值中的一个:Scribunto、css、javascript、json、sanitized-css、text、wikitext
templatesandboxcontentformat

templatesandboxtext的内容格式。

以下值中的一个:application/json、text/css、text/javascript、text/plain、text/x-wiki