Template:Commons category multi/doc

Usage

[edit]

This template is similar to {{Commons category}} but shows up to twelve (12) categories, and allows floating the box to the left.

Usage: {{Commons category multi|topic1|topic2|topic3|…|topic12}}
Usage: {{Commons category multi|topic1|topic2|position=left}}

The template will state "Wikimedia Commons has media related to (category):..." and then display the first 2 topic names in bold/italics as "topic1 or topic2" (as links). The optional topics 3 or 4 would be on the next line ("or topic3 or topic4"). Optional topics 5 and 6 would be on a third line.

The optional |position=left shifts the box to the left margin. The template is on the right margin by default.

|delimiter= specifies which delimiter is used to separate each entry. Be careful, as this parameter accepts wikicode as well. So, to specify semicolon (;) as the delimiter (which is the Wikicode for definition list), use {{;}} instead. Because the leading and trailing spaces are ignored, use   to indicate a space.

Note that the topic names should exist as category names in Wikimedia Commons (edited using a Wikimedia login name).

Location

[edit]
If using a large, graphical template produces odd layout problems, like the excessive white space shown on the right of this screenshot, then switch to a different sister template.

Generally:

☒N Do not place this template or any box-type template in a section all by itself.
☒N Do not place this template in a section containing columns without floating left.
☒N Do not indent this template with colon (:) or a bullet (*) markup.

Specifically:

  • In articles, this template should be placed at the top of the last section on the page so that it floats to the right of that section.
  • In disambiguation pages, this template is usually placed at the top of the page.
  • In categories, this template should be grouped with other templates at the beginning of the category introduction. This avoids unnecessary white space as any text is floated around the template boxes.

Examples

[edit]

The following examples show the results of the template uasge.

Wikitext Displays as
{{Commons category multi|Gold|Silver}}
This example shows the use of |position=left:

{{Commons category multi|Red|Pale Green|position=left}}

{{Commons category multi|Los Angeles|New York}}
This example shows links to misspelled words, in this case "Les Angles" and "Now York."

{{Commons category multi|Les Angles|Now York}}

{{Commons category multi|Ludwig van Beethoven|Richard Strauss}}
{{Commons category multi|Gold|Silver|Bronze}}
{{Commons category multi|Gold|Silver|Bronze|Iron}}
This example shows the use of delimiters; see § Usage section above for more details.

{{Commons category multi|Gold|Silver|Bronze|Iron|Copper|Brass|delimiter=; }}

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Commons category multi in articles based on its TemplateData.

TemplateData for Commons category multi

Displays a box along either lateral page margin with links to up to 12 category pages at Wikimedia Commons

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Topic 11

Name of first category to link to at Wikimedia Commons

Linerequired
Alignmentposition align

Sets the lateral page margin with which the link box is aligned; must be one of: 'left' or 'right' (default).

Suggested values
left right
Default
right
Example
left
Lineoptional
Topic 22

Name of second category to link to at Wikimedia Commons

Lineoptional
Topic 33

Name of third category to link to at Wikimedia Commons

Lineoptional
Topic 44

Name of fourth category to link to at Wikimedia Commons

Lineoptional
Topic 55

Name of fifth category to link to at Wikimedia Commons

Lineoptional
Topic 66

Name of sixth category to link to at Wikimedia Commons

Lineoptional
Topic 77

Name of seventh category to link to at Wikimedia Commons

Lineoptional
Topic 88

Name of eighth category to link to at Wikimedia Commons

Lineoptional
Topic 99

Name of ninth category to link to at Wikimedia Commons

Lineoptional
Topic 1010

Name of tenth category to link to at Wikimedia Commons

Lineoptional
Topic 1111

Name of eleventh category to link to at Wikimedia Commons

Lineoptional
Topic 1212

Name of twelfth category to link to at Wikimedia Commons

Lineoptional
Alternate termalt-term

Replaces the default text 'media related to' the precedes the category links by default

Default
media related to
Example
photos of
Lineoptional
List delimiterdelimiter

Defines a custom text string to separate the category links rather than the default spaced commas

Default
comma
Example
; 
Lineoptional
Conjunctionconjunction

Defines a custom separator between the penultimate and final links when three or more categories are specified rather than the default 'and'

Default
and
Example
or 
Lineoptional

Redirects

[edit]

See also

[edit]