模板:Talkspace detect
此模板被引用于约67,000个页面。 为了避免造成大规模的影响,所有对此模板的编辑应先于沙盒、测试样例或您的沙盒上测试。 测试后无误的版本可以一次性地加入此模板中,但是修改前请务必于讨论页发起讨论。 模板引用数量会自动更新。 |
此模板的文档不存在、不全面或不能详细描述其功能及/或其代码中的参数。请帮助扩充并改进其文档。 |
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 }}
参见
便于侦测命名空间的模板群:
- {{main other}} – 用于条目模板。
- {{talk other}} – 用于讨论页模板。
- {{user other}} – 用于用户页模板。
- {{wikipedia other}} – 用以侦测"Wikipedia:"计划页面。
- {{file other}} – 用于档案(图像)模板
- {{template other}} – 用以侦测模板页。
- {{help other}} – 用于帮助页模板。
- {{category other}} – 用于分类页模板。
- {{portal other}} – 用于主题页模板。
更复杂的命名空间侦测模板:
- {{main talk other}} – 区分某些命名空间。
- {{main talk category other}} – 区分某些命名空间。
- {{namespace detect}} – 多功能模板。
- {{namespace detect showall}} – 超多功能模板。
- {{talkspace detect}} - 侦测不同命名空间的讨论页面。
Technical stuff:
- Wikipedia:命名空间 – Lists all the namespaces.
- Help:魔术字 – About
{{NAMESPACE}}
etc. - Help:解析器函数 – About
{{#ifeq:|||}}
etc.