模板:Talkspace detect/doc
外观
| 此页面是Template:Talkspace detect的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
| 此模板文档被引用于约191,000个页面,占全部页面的2%。 为了避免造成大规模的影响,所有对此模板文档的编辑应先于沙盒、测试样例或您的沙盒上测试。 测试后无误的版本可以一次性地加入此模板文档中,但是修改前请务必于讨论页发起讨论。 模板引用数量会自动更新。 |
| 此模板的文档不存在、不全面或不能详细描述其功能及/或其代码中的参数。请帮助扩充并改进其文档。 |
The {{talkspace detect}} meta-template helps other templates detect what type of page they are on. It detects and groups all the different talkspaces used on Wikipedia into several types:
- main = Defines the output if the template is located on main/article talkspace; aka Talk:.
- user, wikipedia, file, mediawiki, template, help, category and portal = Defines the output if the template is located on the specified talkspaces; aka User talk:, Wikipedia talk:, File talk:, etc.
- default = Defines the output if the template is located on any talkspaces that were not defined as a parameter in this meta-template.
- other = Defines the output if the template is located on any namespaces (not the associated talkspace).
用法
[编辑]This template takes one or more parameters named after the different page types as listed above. Like this:
{{talkspace detect
| main = 條目討論頁文字
| user = 用戶討論頁文字
| default = 其他所有討論頁面文字
| other = 一般名字空間文字
}}
By using an empty parameter you can make it so the template doesn't render anything for some specific page type. Like this:
{{talkspace detect
| main =
| default = Text for all other namespace talk pages
}}
参见
[编辑]