模板:Talkspace detect
跳转到导航
跳转到搜索
File:Test Template Info-Icon - Version (2).svg 模板文档[查看] [编辑] [历史] [清除缓存]
| 警告 | 此模板被引用于约193,000个页面,占全部页面的4%。 为了避免造成大规模的影响,所有对此模板的编辑应先于沙盒、测试样例或您的沙盒上测试。 测试后无误的版本可以一次性地加入此模板中,但是修改前请务必于讨论页发起讨论。 模板引用数量会自动更新。 |
| File:Edit-copy green with red question mark.svg | 此模板的文档不存在、不全面或不能详细描述其功能及/或其代码中的参数。请帮助扩充并改进其文档。 |
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
}}