打开/关闭菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
Junchnzy留言 | 贡献2024年12月23日 (一) 12:16的版本 (创建页面,内容为“{{doc/start}} {| align="center" border="0" cellpadding="3" cellspacing="3" style="border:1px solid; margin:0.5em auto;" |- | style="font-size:90%;" | 本文內容包括由中文維基百科的 [[Wikipedia:{{{1|{{FULLPAGENAME}}}}}|{{{1|{{FULLPAGENAME}}}}}]]條目而來的 CC-BY-SA 內容。 ([http://zh.wikipedia.org/w/index.php?title={{urlencode:{{{1|{{FULLPAGENAMEE}}}}}}}&action=history 作者]) |} '''Linkless exists''' checks whether a page exists. It diffe…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
本文內容包括由中文維基百科的 模板:W/doc條目而來的 CC-BY-SA 內容。 (作者)

Linkless exists checks whether a page exists. It differs from alternatives such as #ifexist: in that the page containing this template is not recorded as linking to or transcluding the page being checked. This has the advantage of avoiding spurious wikilinks, especially to disambiguation pages which should not have incoming links, but has the disadvantage that the containing page may not be updated automatically if the checked page is created or deleted later.

Usage

The template requires one parameter: the name of the page to be checked. Include a namespace where necessary. There are two other optional parameters: the text to appear if the page is present, and the text to appear if it is absent. By default, these are set to "true" and "", which evaluate as true and false respectively within expressions. {{Linkless exists|Main Page|working|broken}} is an efficient shortcut for {{#if:{{Linkless exists|Main Page}}|working|broken}}.

TemplateData

Linkless exists checks whether a page exists without recording a wikilink or transclusion

模板参数

参数描述类型状态
11

The name of the page to be checked

字符串必需
22

The text to appear if the page is present

默认值
true
示例值
page found
字符串可选
33

The text to appear if the page is absent

默认值
(blank string)
示例值
page not found
字符串可选

这是一个模板说明页,应当会显示在对应的模板页,详情见{{Doc}}