Difference between revisions of "Template:Category see also"

From blackwiki
Jump to navigation Jump to search
imported>Fabartus
m (update fm Wikiversity tweak)
imported>BrownHairedGirl
 
(70 intermediate revisions by 46 users not shown)
Line 1: Line 1:
<noinclude>
+
<includeonly>{{#invoke:Category see also|main}}{{Category see also/Category pair check|{{{1|}}}}}</includeonly><noinclude>
<!-- If you want "See also (related category):" write your own front end template like wpd-catlist-up, etc. or just use the LABEL=... that's why it was put there! - This version is interwiki, and there is no "related" albums on other sister projects! User:Fabartus aka FrankB 05:53, 17 August 2008 -->
+
{{Documentation}}
</noinclude><includeonly><span class="boilerplate catseealso">{{{LABEL|''See also}}} {{#if:{{{1|}}}|{{#if:{{{2|}}}|categories:{{#if:{{{LABEL|}}}||''}} [[{{{SISTER|}}}:Category:{{{1}}}|{{{1}}}]]|category:{{#if:{{{LABEL|}}}||''}} [[{{{SISTER|}}}:Category:{{{1}}}|{{{1}}}]]
 
}} |'''Error: [[Template:Cat see also]]←→Template must be given at least one category name.'''}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|, |&nbsp;and }} [[{{{SISTER|}}}:Category:{{{2}}}|{{{ 2 }}}]]
 
}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{3}}}|{{{ 3 }}}]]
 
}}{{#if:{{{4|}}}|{{#if:{{{5|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{4}}}|{{{ 4 }}}]]
 
}}{{#if:{{{5|}}}|{{#if:{{{6|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{5}}}|{{{ 5 }}}]]
 
}}{{#if:{{{6|}}}|{{#if:{{{7|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{6}}}|{{{ 6 }}}]]
 
}}{{#if:{{{7|}}}|{{#if:{{{8|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{7}}}|{{{ 7 }}}]]
 
}}{{#if:{{{8|}}}|{{#if:{{{9|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{8}}}|{{{ 8 }}}]]
 
}}{{#if:{{{9|}}}|{{#if:{{{10|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{9}}}|{{{ 9 }}}]]
 
}}{{#if:{{{10|}}}|{{#if:{{{11|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{10}}}|{{{ 10 }}}]]
 
}}{{#if:{{{11|}}}|{{#if:{{{12|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{11}}}|{{{ 11 }}}]]
 
}}{{#if:{{{12|}}}|{{#if:{{{13|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{12}}}|{{{ 12 }}}]]
 
}}{{#if:{{{13|}}}|{{#if:{{{14|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{13}}}|{{{ 13 }}}]]
 
}}{{#if:{{{14|}}}|{{#if:{{{15|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{14}}}|{{{ 14 }}}]]
 
}}{{#if:{{{15|}}}|{{#if:{{{16|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{15}}}|{{{ 15 }}}]]
 
}}{{#if:{{{16|}}}|{{#if:{{{17|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{16}}}|{{{ 16 }}}]]
 
}}{{#if:{{{17|}}}|{{#if:{{{18|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{17}}}|{{{ 17 }}}]]
 
}}{{#if:{{{18|}}}|{{#if:{{{19|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{18}}}|{{{ 18 }}}]]
 
}}{{#if:{{{19|}}}|{{#if:{{{20|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{19}}}|{{{ 19 }}}]]
 
}}{{#if:{{{20|}}}|{{#if:{{{21|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{20}}}|{{{ 20 }}}]]
 
}}{{#if:{{{21|}}}|{{#if:{{{22|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{21}}}|{{{ 21 }}}]]
 
}}{{#if:{{{22|}}}|{{#if:{{{23|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{22}}}|{{{ 22 }}}]]
 
}}{{#if:{{{23|}}}|{{#if:{{{24|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{23}}}|{{{ 23 }}}]]
 
}}{{#if:{{{24|}}}|{{#if:{{{25|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{24}}}|{{{ 24 }}}]]
 
}}{{#if:{{{25|}}}|{{#if:{{{26|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{25}}}|{{{ 25 }}}]]
 
}}{{#if:{{{26|}}}|{{#if:{{{27|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{26}}}|{{{ 26 }}}]]
 
}}{{#if:{{{27|}}}|{{#if:{{{28|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{27}}}|{{{ 27 }}}]]
 
}}{{#if:{{{28|}}}|{{#if:{{{29|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{28}}}|{{{ 28 }}}]]
 
}}{{#if:{{{29|}}}|{{#if:{{{30|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{29}}}|{{{ 29 }}}]]
 
}}{{#if:{{{30|}}}|{{#if:{{{31|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{30}}}|{{{ 30 }}}]]
 
}}{{#if:{{{31|}}}|{{#if:{{{32|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{31}}}|{{{ 31 }}}]]
 
}}{{#if:{{{32|}}}|{{#if:{{{33|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{32}}}|{{{ 32 }}}]]
 
}}{{#if:{{{33|}}}|{{#if:{{{34|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{33}}}|{{{ 33 }}}]]
 
}}{{#if:{{{34|}}}|{{#if:{{{35|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{34}}}|{{{ 34 }}}]]
 
}}{{#if:{{{35|}}}|{{#if:{{{36|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{35}}}|{{{ 35 }}}]]
 
}}{{#if:{{{36|}}}|{{#if:{{{37|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{36}}}|{{{ 36 }}}]]
 
}}{{#if:{{{37|}}}|{{#if:{{{38|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{37}}}|{{{ 37 }}}]]
 
}}{{#if:{{{38|}}}|{{#if:{{{39|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{38}}}|{{{ 38 }}}]]
 
}}{{#if:{{{39|}}}|{{#if:{{{40|}}}|, |,&nbsp;and }} [[{{{SISTER|}}}:Category:{{{39}}}|{{{ 39 }}}]]
 
}}{{#if:{{{40|}}}|,&nbsp;and [[{{{SISTER|}}}:Category:{{{40}}}|{{{ 40}}}]]
 
}}{{#if:{{{41|}}}|…'''Error: [[Template:Cat see also]] maximum 40  list parameters allowed.'''
 
}} </span></includeonly><noinclude><div style="background:#bbddff; padding:1em;margin:0 2em 0 2em; ">{{interwikitmp-grp|V=1}}
 
<center>(Note: The template displays an error message if given no inputs, so is hidden above)</center>
 
{{usage div}}
 
'''Version-at-a-glance:'''
 
:3) source: Wikiversity -- Expand usage to cover SISTER and LABEL parameters (lost in /doc file? Or just never updated?) // <b>[[User:Fabartus|Fra]]</b><font color="green">[[User talk:Fabartus|nkB]]</font> 06:48, 17 August 2008 (UTC)
 
:2) source: Wikispecies/wikipedia -- Reconcile categories (Iterim) and code across sister projects // <b>[[User:Fabartus|Fra]]</b><font color="green">[[User talk:Fabartus|nkB]]</font> 05:53, 17 August 2008 (UTC)<br/>
 
:1) source: Commons -- Move forced italics from before LABEL to default only when undefined, and matching logic for stopping italics... gives user better formatting control, by specifying LABEL. No effect when not defined, so minimal impact. // <B>[[User:Fabartus|Fra]]</B><font color="green">[[User talk:Fabartus|nkB]]</font> 04:51, 17 August 2008 (UTC)
 
</div>
 
==Usage==
 
;Usual syntax
 
:<code> '''<nowiki>{{</nowiki> Cat see also | List of category names (one or more) }}'''</code>
 
 
 
'''Parameters:'''
 
# Most are pipe character separated category page names; up to 40 pages
 
# LABEL=''Some other phrase''...  → replaces defaults: ''"See also Category:" or "See also categories:"'' (prefix messages).
 
## That phrase is normally italicized. When defining LABEL any wikimarkup or HTML text will be accepted.
 
## You may assume a space before the first category link.
 
## The template is written in an HTML &lt;span>...</span&gt; block, so can be used in-line as part of a sentence. Conversely, an editor must ensure a blank line or HTML "&lt;br/&gt;" follows it, or the text may be run the next line into it.
 
# SISTER=Any valid interwiki or interproject prefix from de:, fr:, es: access to other wikipedia's to cross sister wiki's using sister projects abbreviations such as B:, Q:, S:, v: etc. and where applicable, both interlingual and cross project links can be made like
 
## <code>SISTER=de:V:</code> for linking categories on the {{wpd|German language}} {{wpd|Wikiversity}}, or
 
## <code>SISTER=fr:B:</code> for linking categories on the {{wpd|French language}} {{wpd|Wikibooks}}.
 
 
 
;Simple examples
 
# <nowiki>{{</nowiki>Cat see also|A}} → {{Cat see also|A}}<br/><br/>
 
# <nowiki>{{</nowiki>Cat see also|A|B}} → {{Cat see also|A|B}}<br/><br/>
 
# <nowiki>{{</nowiki>Cat see also|A|B|C}} → {{Cat see also|A|B|C}}<br/>
 
 
 
;example w/default message:
 
: <tt><nowiki>{{Cat see also|aaa|bbb|ccc|ddd|eee|fff}}</nowiki></tt>
 
 
 
;would give (display as):
 
:<code> ''See also Categories:'' aaa, bbb, ccc, ddd, and eee </code>
 
 
 
;example w/LABEL parameter option
 
: <tt><nowiki>{{Cat see also|LABEL=See this list to evaluate whether one would be a better choice of |aaa | bbb | ccc | ddd | eee | fff }}</nowiki></tt>
 
 
 
;would give (display as):
 
:<code> ''See this list to evaluate whether one would be a better choice of categories: aaa, bbb, ccc, ddd, eee, and fff'' </code>
 
;Pragmatic Example:
 
 
 
Bobsledding, luge, and skeleton are Olympic sports properly subcategorized under 'sledding', so shouldn't appear (strictly speaking categorically so to speak) as sub-categories of 'winter sports', but which a lay reader using categories might expect to find them. {{I2}}So to show their presence and guide proper selections for editors choosing categories amongst the three layers of categories, one can include the sub-sub-categories as a see also annotation on the {{wpd|Category:Winter sports|Winter sports}} page.
 
 
 
:{{cat see also|SISTER=W:|Luge|Bobsleigh|Skeleton}}
 
;given by...
 
<pre>{{cat see also|SISTER=W:|Luge|Bobsleigh|Skeleton}}</pre>
 
 
 
{{#ifexist:Template:Templates linking contents|
 
{{Templates linking contents}}
 
}}
 
{{#ifexist:Category:Internal link templates|
 
[[Category:Internal link templates|{{PAGENAME}}]]
 
}}
 
{{#ifexist:Category:Category navigational templates|
 
[[Category:Category navigational templates|{{PAGENAME}}]]
 
}}
 
{{#ifeq:{{Silence}}|NO|
 
{{#ifexist:Category:Templates using ParserFunctions|
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
 
}}
 
|}}
 
{{#ifexist:Category:Internal link templates|
 
[[Category:Internal link templates|{{PAGENAME}}]]
 
}}
 
{{#ifexist:Category:Navigational templates|
 
[[Category:Navigational templates|{{PAGENAME}}]]
 
}}
 
{{#ifexist:Category:Section templates |
 
[[Category:Section templates|{{PAGENAME}}]]
 
}}
 
{{#ifexist:Category:List templates|
 
[[Category:List templates|{{PAGENAME}}]]
 
}}
 
{{#ifexist:Category:Category namespace templates|
 
[[Category:Category namespace templates|{{PAGENAME}}]]
 
}}
 
{{#ifexist:Category:See also templates|
 
[[Category:See also templates]]
 
}}
 
 
 
<!-- interwiki's --->
 
{{#ifeq:{{SITENAME}}|Wikimedia Commons|
 
[[en:Template:Cat see also]]
 
[[b:en:Template:Cat see also]]
 
[[species:Template:Cat see also]]
 
[[v:Template:Cat see also]]
 
}}
 
[[zh:Template:参看]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:31, 28 April 2018

Template documentation[view] [edit] [history] [purge]

Usage

Usual syntax

{{Category see also|List of one or more category names}}

Parameters

  • Most are pipe character-separated category page names; up to 40 pages can be included.
  • LABEL=Some other phrase... → replaces the default message prefix: "See also".
    The phrase is normally italicized. When defining LABEL any wikimarkup or HTML text will be accepted. The template will add a colon at the end of the phrase.
  • |project=: Any valid interwiki or interproject prefix from de:, fr:, es: access to other language Wikipedias to cross-sister wikis using sister projects abbreviations such as B:, Q:, S:, V: etc. Where applicable, both interlingual and cross-project links can be rendered as follows:
    • |project=es for linking categories on es.wikipedia.org, the Spanish-language Wikipedia, or
    • |project=de:V for linking categories on de.wikiversity.org, the German-language Wikiversity, or
    • |project=fr:B for linking categories on fr.wikibooks.org, the French-language Wikibooks.
  • The template creates a block-level element in the HTML, effectively forming its own paragraph; it may not be used inline in text.

Simple examples

  1. {{Category see also|A}}
  2. {{Category see also|A|B}}
  3. {{Category see also|A|B|C}}

Example with default message

{{Category see also|aaa|bbb|ccc|ddd|eee}}

Example with LABEL parameter option

{{Category see also|LABEL=See this list to evaluate whether one of them would be a better choice|aaa|bbb|ccc|ddd|eee}}

Practical example

Bobsledding and luge are Olympic sports properly subcategorized under "sledding", so should not appear (strictly speaking categorically) as sub-categories of "winter sports". However, a lay reader using categories might expect to find them there. So to show their presence and guide proper selections for editors choosing categories, one can include the sub-sub-categories as a see also annotation on the Category:Winter sports page.

{{Category see also|Luge|Bobsleigh}}

TemplateData

TemplateData documentation used by VisualEditor and other tools
See the monthly parameter usage report for this template.

TemplateData for Category see also

No description.

Template parameters

ParameterDescriptionTypeStatus
11

no description

Unknownrequired
22

no description

Unknownoptional
33

no description

Unknownoptional
44

no description

Unknownoptional
55

no description

Unknownoptional
66

no description

Unknownoptional
77

no description

Unknownoptional
88

no description

Unknownoptional
99

no description

Unknownoptional
1010

no description

Unknownoptional
1111

no description

Unknownoptional
1212

no description

Unknownoptional
1313

no description

Unknownoptional
1414

no description

Unknownoptional
1515

no description

Unknownoptional
1616

no description

Unknownoptional
1717

no description

Unknownoptional
1818

no description

Unknownoptional
1919

no description

Unknownoptional
2020

no description

Unknownoptional
2121

no description

Unknownoptional
2222

no description

Unknownoptional
2323

no description

Unknownoptional
2424

no description

Unknownoptional
2525

no description

Unknownoptional
2626

no description

Unknownoptional
2727

no description

Unknownoptional
2828

no description

Unknownoptional
2929

no description

Unknownoptional
3030

no description

Unknownoptional
3131

no description

Unknownoptional
3232

no description

Unknownoptional
3333

no description

Unknownoptional
3434

no description

Unknownoptional
3535

no description

Unknownoptional
3636

no description

Unknownoptional
3737

no description

Unknownoptional
3838

no description

Unknownoptional
3939

no description

Unknownoptional
4040

no description

Unknownoptional
4141

no description

Unknownoptional
LABELLABEL

no description

Unknownoptional
Projectproject

no description

Default
en
Example
es, de:V, fr:B
Stringoptional

See also