Difference between revisions of "Template:Commons category multi/doc"
imported>Codename Lisa (|width parameter has been removed. {{Sister project}} does not support it.) |
imported>Codename Lisa (Add info on {{{delimiter}}}) |
||
| Line 14: | Line 14: | ||
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 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. | ||
| − | {{para|align|left}} shifts the box to the left margin. | + | The optional {{para|align|left}} shifts the box to the left margin. The template is on the right margin by default. |
| + | |||
| + | {{Para|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 ([[H:DL|which is the Wikicode for definition list]]), use <nowiki>{{;}}</nowiki> instead. Because the leading and trailing spaces are ignored, use &#32; to indicate space. | ||
Note that the topic names should exist as category names in Wikimedia Commons (edited using a Wikimedia login name). | Note that the topic names should exist as category names in Wikimedia Commons (edited using a Wikimedia login name). | ||
| Line 31: | Line 33: | ||
The following examples show the results of the template as stored in the Wikipedia library (but not the results when previewing the template during editing). | The following examples show the results of the template as stored in the Wikipedia library (but not the results when previewing the template during editing). | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver}}</nowiki></code>" | + | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver}}</nowiki></code>": |
{{Commons category multi | Gold | Silver}} | {{Commons category multi | Gold | Silver}} | ||
{{-}} | {{-}} | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Red | Pale Green | align=left}}</nowiki></code>" | + | : Example for "<code><nowiki>{{Commons category multi | Red | Pale Green | align=left}}</nowiki></code>": |
{{Commons category multi | Red | Pale Green | align=left}} | {{Commons category multi | Red | Pale Green | align=left}} | ||
{{-}} | {{-}} | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Los Angeles | New York}}</nowiki></code>" | + | : Example for "<code><nowiki>{{Commons category multi | Los Angeles | New York}}</nowiki></code>": |
{{Commons category multi | Los Angeles | New York}} | {{Commons category multi | Los Angeles | New York}} | ||
{{-}} | {{-}} | ||
| − | : Misspelling in "<code><nowiki>{{Commons category multi | Les Angles | Now York}}</nowiki></code>" | + | : Misspelling in "<code><nowiki>{{Commons category multi | Les Angles | Now York}}</nowiki></code>": |
{{Commons category multi | Les Angles | Now York}} | {{Commons category multi | Les Angles | Now York}} | ||
{{-}} | {{-}} | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Ludwig van Beethoven | Richard Strauss | width=22em}}</nowiki></code>" | + | : Example for "<code><nowiki>{{Commons category multi | Ludwig van Beethoven | Richard Strauss | width=22em}}</nowiki></code>": |
{{Commons category multi | Ludwig van Beethoven | Richard Strauss | width=22em}} | {{Commons category multi | Ludwig van Beethoven | Richard Strauss | width=22em}} | ||
{{-}} | {{-}} | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver | Bronze}}</nowiki></code>" | + | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver | Bronze}}</nowiki></code>": |
{{Commons category multi | Gold | Silver | Bronze}} | {{Commons category multi | Gold | Silver | Bronze}} | ||
{{-}} | {{-}} | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver | Bronze | Iron}}</nowiki></code>" | + | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver | Bronze | Iron}}</nowiki></code>": |
{{Commons category multi | Gold | Silver | Bronze | Iron}} | {{Commons category multi | Gold | Silver | Bronze | Iron}} | ||
{{-}} | {{-}} | ||
| − | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver | Bronze | Iron | Copper | Brass}}</nowiki></code>" below | + | : Example for "<code><nowiki>{{Commons category multi | Gold | Silver | Bronze | Iron | Copper | Brass |delimiter={{;}}&#32;}}</nowiki></code>" is shown below. See "Usage" section above for explanation. |
| − | {{Commons category multi | Gold | Silver | Bronze | Iron | Copper | Brass}} | + | {{Commons category multi | Gold | Silver | Bronze | Iron | Copper | Brass |delimiter={{;}} }} |
{{-}} | {{-}} | ||
Revision as of 18:31, 6 February 2016
| 40px | This is a documentation subpage for Template:Commons category multi. It contains usage information, categories and other content that is not part of the original template page. |
Contents
Usage
This template is similar to {{Commons category}} but shows 2, 3, 4, 5 or 6 categories, and allows changing width or floating the box to the left.
- Usage:
{{Commons category multi | topic1 | topic2 | align=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}}
- Usage:
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 |align=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
- REDIRECT Template:Xmark
25px This page is a redirect:
|
Do not place this template in a section all by itself.
- REDIRECT Template:Xmark
25px This page is a redirect:
|
Do not place this template in a section containing columns.
In articles, this template should be placed in the External links section, if one exists, or at the top of the last section on the page, if no external links section exists. However, uf 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.
Examples
The following examples show the results of the template as stored in the Wikipedia library (but not the results when previewing the template during editing).
- Example for "
{{Commons category multi | Gold | Silver}}":
- Example for "
{{Commons category multi | Red | Pale Green | align=left}}":
- Example for "
{{Commons category multi | Los Angeles | New York}}":
- Misspelling in "
{{Commons category multi | Les Angles | Now York}}":
- Example for "
{{Commons category multi | Ludwig van Beethoven | Richard Strauss | width=22em}}":
- Example for "
{{Commons category multi | Gold | Silver | Bronze}}":
- Example for "
{{Commons category multi | Gold | Silver | Bronze | Iron}}":
- Example for "
{{Commons category multi | Gold | Silver | Bronze | Iron | Copper | Brass |delimiter={{;}} }}" is shown below. See "Usage" section above for explanation.
See also
- Template:Commons
- Template:Commons-inline—shows Commons gallery inline
- Template:Commons category
- Template:Commons category-inline—shows Commons category inline
- Template:Commons and category—shows Commons gallery and category
- Template:Commons and category-inline—shows Commons gallery and category inline
- Template:Sister project links—to link all Wikinews, Wikisource, etc.