Jump to content
Wikipedia The Free Encyclopedia

Template:Commons category multi

From Wikipedia, the free encyclopedia
Wikimedia Commons has media related to .
Template documentation[view] [edit] [history] [purge]
Note how misspelled words seem to be valid links to Wikimedia Commons. Check spelling carefully.

Usage

This template is similar to {{Commons category }} but shows up to 12 categories, and allows changing width or floating the box to the left.

Usage: {{Commons category multi | topic1 | topic2 | position=left | width=20em}}
Usage: {{Commons category multi | topic1 | topic2 | topic3}}
Usage: {{Commons category multi | topic1 | topic2 | topic3 | topic4}}
Usage: {{Commons category multi | topic1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 | t10 | t11 | t12}}

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 space.

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

Location

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

The following examples show the results of the template uasge.

{{Commons category multi | Gold | Silver}}
Wikimedia Commons has media related to Gold and Silver .
This example shows the use of |position=left

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

Wikimedia Commons has media related to Red and Pale Green .
{{Commons category multi | Los Angeles | New York}}
Wikimedia Commons has media related to Los Angeles and New York .
This example shows links to misspelled words, in this case "Les Angles".

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

Wikimedia Commons has media related to Les Angles and Now York .
{{Commons category multi | Ludwig van Beethoven | Richard Strauss}}
Wikimedia Commons has media related to Ludwig van Beethoven and Richard Strauss .
{{Commons category multi | Gold | Silver | Bronze}}
Wikimedia Commons has media related to Gold , Silver and Bronze .
{{Commons category multi | Gold | Silver | Bronze | Iron}}
Wikimedia Commons has media related to Gold , Silver , Bronze and Iron .
This example shows the use of delimiters. See "Usage" section above for explanation.

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

Wikimedia Commons has media related to Gold ; Silver ; Bronze ; Iron ; Copper ; Brass .

Redirects

See also

The above documentation is transcluded from Template:Commons category multi/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /