Jump to content

From Noumenapedia
Revision as of 10:24, 9 September 2026 by Deleatur yhe (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Commons and category/doc

__EXPECTED_UNCONNECTED_PAGE__

Usage

Sometimes articles have both Commons articles (galleries) and categories about them. This template can be used to generate a right-aligned (default) message box link to a Commons gallery and a Commons category. It is intended for use in the "External links" section of an article.

Format

{{Commons and category|CommonsGalleryName|CommonsCategoryName}}

Please note that the Commons gallery (1st parameter) or the Commons category (2nd parameter) are both optional: if either is left blank, the template will search for them in Wikidata.

There are two optional parameters:

  • <syntaxhighlight lang="wikitext" inline style="display: none;" />|position= -- can specify whether the box is shifted to the left of the article
  • <syntaxhighlight lang="wikitext" inline style="display: none;" />|linktext= -- can override the text in the main link

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:

X markN Do not place this template or any box-type template in a section all by itself.
X markN Do not place this template in a section containing columns without floating left.
X markN Do not indent this template with colon (<syntaxhighlight lang="text" class="" style="" inline="1">:</syntaxhighlight>) or a bullet (<syntaxhighlight lang="text" class="" style="" inline="1">*</syntaxhighlight>) 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

{{Commons and category|Automobile|Automobiles}}
{{Commons and category}} when placed on Car (gallery and category both in wikidata):
{{Commons and category}} when placed on Beinn an Dòthaidh (only category in wikidata):
{{Commons and category}} when placed on Samuel Baker House (only gallery in wikidata):
{{Commons and category}} when placed on Chicago Lawn, Chicago (neither gallery nor category in wikidata):

See also