跳转到内容

Template:PAGENAME

本页使用了标题或全文手工转换
被永久保护的模板
维基百科,自由的百科全书

这是Template:PAGENAME当前版本,由Tjmj留言 | 贡献编辑于2023年9月8日 (五) 16:55。这个网址是本页该版本的固定链接。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)

PAGENAME

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

使用方法

{{PAGENAME}} is not actually a template, but instead is a magic word, meaning it is a feature of the MediaWiki software. When used, it will return the name of the page it's on, but without the namespace. As an example, when placed on this page, it returns PAGENAME. When placed on Wikipedia:Village pump, it will return Village pump. It is possible to specify which pagename will appear by using a colon (not a pipe as is typical for templates). As an example, {{PAGENAME:Wikipedia:Village pump}} returns Village pump.

There is actual template code here. The purpose of the template code is to ensure that if someone uses this magic word with a piped parameter, the template code will be invoked and it will not cause an error on the page. Parameter 1 will be used as the : parameter and other parameters will be discarded. This way, if someone mistakenly enters {{PAGENAME|Wikipedia:Village pump}}, the template will change it to the correct {{PAGENAME:Wikipedia:Village pump}}

When a user mistakenly includes a pipe in a {{PAGENAME}} call, the template code will add the page to the hidden category Category:Pages which use a template in place of a magic word. Pages in this category should be fixed by willing editors.

範例

重定向

注意事项

模板编辑说明

參見