Template:Talkspace detect/doc: Difference between revisions

Content deleted Content added
No edit summary
Fix wording and naming of things. Not "namespace" but "subject space" for non-talkpages.
Line 2:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
TheThis is the {{tl|talkspace detect}} meta-template.

It helps other templates detect what type of page they are on. It detects and groups all the different [[Wikipedia:Namespace#Enumeration|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 into this meta-template.
:'''other''' = Defines the output if the template is located on any namespacessubject space (not the associated talkspace).
 
=== Usage ===
Line 17 ⟶ 19:
| main = Article talk page text
| user = User talk page text
| default = Text for all other namespace talk pagestalkspaces
| other = Text for all namespacessubject spaces
}}
</pre>
 
By using an empty parameter you can make it so thethis template doesn't render anything for some specific page type. Like this:
 
<pre>
{{talkspace detect
| main =
| default = Text for all other namespace talk pagestalkspaces
}}
</pre>