模板:PAGENAME/sandbox
![本頁使用了標題或全文手工轉換](http://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/35px-Zh_conversion_icon_m.svg.png)
PAGENAME/sandbox
![]() | 這是Template:PAGENAME(差異)的沙盒。 |
![]() | 請使用{{PAGENAME:页面名}}而不是{{PAGENAME|页面名}},中間是一個半角冒號「:」,不是管道符號「|」,這樣即可直接調用魔術字而不需要透過該模版間接調用。 |
使用方法
[編輯]![]() | Please use {{PAGENAME:page name}} rather than {{PAGENAME|page name}}, with a colon (":"), not a pipe symbol ("|"). This uses the magic word directly instead of using the template to call the magic word. |
{{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/sandbox. 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.
範例
[編輯]重新導向
[編輯]注意事項
[編輯]模板編輯說明
[編輯]參見
[編輯]- List of page name magic words (MediaWiki幫助)
- {{Page}}
- {{Name}}
- {{PAGENAMEBASE}} (可以從標題中去除括號)
- {{FULLPAGENAME}} (包括命名空間)
上述文件嵌入自Template:PAGENAME/doc。 (編輯 | 歷史) 編者可以在本模板的沙盒 (編輯 | 差異)和測試樣例 (建立)頁面進行實驗。 請在/doc子頁面中添加分類。本模板的子頁面。 |