Template:Screenshot cat

From FlightGear wiki
Jump to navigation Jump to search

{{screenshot cat}}: The parameter category is missing

The following template description is not displayed when the template is inserted in an article.

Goal

This template can be added to articles about a certain subject of which there is a category with in-sim screenshots from FlightGear, for example aircraft, airports or scenery.

Note The template will be shown with English text if there is no translation for the language the page is on. See also Technical details below.

Usage

Preferably add this to the top of the Gallery or Related contents section of the article, or on top of disambiguation pages.

{{screenshot cat
| category = 
| subject  = 
| image    = 
| lang     = 
}}

The parameter category is mandatory. The other parameters are optional.

category
Category with screenshots without the Category: prefix, for example McDonnell Douglas F-15 Eagle screenshots‎ for Category:McDonnell Douglas F-15 Eagle screenshots‎.
subject
Subject of the category including the if needed, for example the McDonnell Douglas F-15 Eagle. Defaults to the name of the page the template is placed on.
image
Representative image (that is legible in a very small thumbnail) without the File: prefix, for example F-15.jpg. Defaults to a screenshot icon.
lang
ISO 639-1 two letter language code to force a translation to be shown for debugging purposes.

Examples

Using only the mandatory parameter

{{screenshot cat
| category = McDonnell Douglas F-15 Eagle screenshots
}}

Also using custom subject

{{screenshot cat
| category = McDonnell Douglas F-15 Eagle screenshots
| subject  = the McDonnell Douglas F-15 Eagle
}}

Also using custom image

{{screenshot cat
| category = McDonnell Douglas F-15 Eagle screenshots
| subject  = the McDonnell Douglas F-15 Eagle
| image    = F-15.jpg
}}

Also forcing the language

{{screenshot cat
| category = Cessna 172 screenshots
| subject  = del Cessna 172
| image    = Cessna 172P.jpg
| lang     = es
}}

Known issues

The template is floating and can sometimes break galleries etc. This can be fixed by adding the full break template, {{-}}, directly after the {{screenshot cat}} template, like below:

{{screenshot cat
| category = Cessna 172 screenshots
| subject  = the Cessna 172
| image    = Cessna 172P.jpg
}}{{-}}
<gallery mode="packed">
<!-- ... -->
</gallery>

Technical details

To show the template in other languages than English, depending on the language prefix of a page, the template use the {{LangSwitch}} template.

Related templates

Related content