Template:Category explanation/doc: Difference between revisions

Content deleted Content added
update example
add high-use (more than 100k transclusions)
 
(6 intermediate revisions by 4 users not shown)
Line 1:
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}
 
This template is for use on [[WP:CATEGORY|category]] pages (in the Category: namespace), producing a [[WP:HATNOTE|hatnote]] describing the category. It takes a single parameter{{Snd}} the category description{{Snd}} producing the hatnote:
== Usage ==
: ''This [[WikipediaHelp:CategorizationCategories|category]] is for {{{1}}}.''
[[Wikt:mnemonic|Mnemonically]] '''''C'''ategory'' '''''e'''xplanation''.
followed by that description. Any spaces surrounding the parameter are removed, and a space is inserted before it. It should be worded so as to make the result a complete English sentence. A [[Full stop|period (full stop)]] will be added to the end if the parameter does not already end with a period. The hatnote is indented and on a new line (technically, in a new [[Span and div|<code><nowiki><div></nowiki></code>]]).
 
This template is meant to be a brief explanation of a [[Wikipedia:Categorization|category]].
 
=== Template contents ===
''This [[Wikipedia:Categorization|category]] is for {{{1}}}.''
 
Where the parameter '''<nowiki>{{{1}}}</nowiki>''' can be any text, including text with [[Help:Link|links]].
 
== Examples ==
* <span style="color:darkgreen;">This code: {{tlc|{{BASEPAGENAME}}|articles related to <nowiki>[[foo]]</nowiki>}} produces:</span> {{{{BASEPAGENAME}}|articles related to [[foo]]}}
 
* <span style="color:darkgreen;">This code: {{tlc|{{BASEPAGENAME}}|articles related to <nowiki>[[foo]].</nowiki>}} produces:</span>{{{{BASEPAGENAME}}|articles related to [[foo]].}}
=== Standard usage ===
* <span style="color:red;">This code: {{tlc|{{BASEPAGENAME}}|articles related to <nowiki>[[foo]]:</nowiki>}} (undesirably) produces:</span>{{{{BASEPAGENAME}}|articles related to [[foo]]:}}
''Usage:''
: {{tlc|{{BASEPAGENAME}}|an explanation without a period at the end}}
''Output:''
{{{{BASEPAGENAME}}|an explanation without a period at the end}}
 
=== Ending with period ===
''Usage:''
: {{tlc|{{BASEPAGENAME}}|an explanation with a period at the end.}}
''Output:''
{{{{BASEPAGENAME}}|an explanation with a period at the end.}}
 
=== Leading/trailing spaces ===
''Usage:''
: {{tlcw|{{BASEPAGENAME}} | an explanation with leading and trailing spaces. }}
''Output:''
{{{{BASEPAGENAME}} | an explanation with leading and trailing spaces. }}
 
==Redirects==
Line 38 ⟶ 18:
* {{Tlx|Catexp}}
* {{Tlx|Cat exp}}
* {{Tlx|Category see alsodescription}}
* {{Tlx|Cat maindescription}}
 
==See also==
{{Category hatnote templates}}
{{see also|Wikipedia:Hatnote#Categories}}
{{main category|Hatnote templates for category pages}}
* {{Tlx|Cat main}}
* {{Tlx|Cat more}}
* {{Tlx|Category main section}}
* {{Tlx|Category see also}}
 
{{Namespace category}}