Jump to content

Template:Talkspace detect/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Davidgothberg (talk | contribs) at 02:22, 25 November 2009 (Fix wording and naming of things. Not "namespace" but "subject space" for non-talkpages.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This is the {{talkspace detect}} meta-template.

It 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 to this meta-template.
other = Defines the output if the template is located on any subject space (not the associated talkspace).

Usage

This template takes one or more parameters named after the different page types as listed above. Like this:

{{talkspace detect
| main    = Article talk page text
| user    = User talk page text
| default = Text for all other talkspaces
| other   = Text for all subject spaces
}}

By using an empty parameter you can make it so this template doesn't render anything for some specific page type. Like this:

{{talkspace detect
| main    = 
| default = Text for all other talkspaces
}}

See also