Template:CatRel: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
Confocal (talk | contribs)
simplify via subtemplate
Confocal (talk | contribs)
m extract documentation
 
Line 10: Line 10:
-->|<!-- =2 -->See also categories {{c|{{{1}}}}} and {{c|{{{2}}}}}}}<!--
-->|<!-- =2 -->See also categories {{c|{{{1}}}}} and {{c|{{{2}}}}}}}<!--
-->|<!-- =1 -->See also category {{c|{{{1}}}}}}}<!--
-->|<!-- =1 -->See also category {{c|{{{1}}}}}}}<!--
-->|<!-- =0 -->Warning: missing category name. See {{tl|CatRel}} for the documentation.}}''</includeonly><noinclude>This is a small template to link to one or more related categories.
-->|<!-- =0 -->Warning: missing category name. See {{tl|CatRel}} for the documentation.}}''</includeonly><noinclude>{{/Doc}}
 
This template should be transcluded on a separate line. It is designed to be used either at the beginning of a section other than the lead section of the article, or on a category page in the description of the category. Up to four links are currently supported.
 
==Examples==
 
* <tt><nowiki>{{CatRel|Spaceships|Oscillators|Still lifes|Sawtooths}}</nowiki></tt>
: {{CatRel|Spaceships|Oscillators|Still lifes|Sawtooths}}
* <tt><nowiki>{{CatRel|Spaceships|Oscillators|Still lifes}}</nowiki></tt>
: {{CatRel|Spaceships|Oscillators|Still lifes}}
* <tt><nowiki>{{CatRel|Spaceships|Oscillators}}</nowiki></tt>
: {{CatRel|Spaceships|Oscillators}}
* <tt><nowiki>{{CatRel|Templates}}</nowiki></tt>
: {{CatRel|Templates}}
* <tt><nowiki>{{CatRel|Category:Templates}}</nowiki></tt>
: {{CatRel|Category:Templates}}
* <tt><nowiki>{{CatRel}}</nowiki></tt>
: {{CatRel}}
* <tt><nowiki>{{CatRel|A|B|C|D|E}}</nowiki></tt>
: {{CatRel|A|B|C|D|E}}
 
==Other templates==
* {{tl|related}} -- a template for linking to related pages in the main namespace
* {{tl|CategoryLink}} -- another category-linking template, used in "See also" sections of articles and for formatted inline links
 
[[Category:Internal link templates]]
[[Category:Internal link templates]]
[[Category:Hatnote templates]]
[[Category:Hatnote templates]]
</noinclude>
</noinclude>

Latest revision as of 06:08, 1 April 2023

{{CatRel}} is a small template to link to one or more related categories.

This template should be transcluded on a separate line. It is designed to be used either at the beginning of a section other than the lead section of the article, or on a category page in the description of the category. Up to four links are currently supported.

Examples

  • {{CatRel|Spaceships|Oscillators|Still lifes|Sawtooths}}
See also categories Spaceships, Oscillators, Still lifes and Sawtooths
  • {{CatRel|Spaceships|Oscillators|Still lifes}}
See also categories Spaceships, Oscillators and Still lifes
  • {{CatRel|Spaceships|Oscillators}}
See also categories Spaceships and Oscillators
  • {{CatRel|Templates}}
See also category Templates
  • {{CatRel|Category:Templates}}
See also category Templates
  • {{CatRel}}
Warning: missing category name. See {{CatRel}} for the documentation.
  • {{CatRel|A|B|C|D|E}}
Warning: too many category names. See {{CatRel}} for the documentation.

Other templates

  • {{related}} -- a template for linking to related pages in the main namespace
  • {{CategoryLink}} -- another category-linking template, used in "See also" sections of articles and for formatted inline links