Template:Glossary

From PCGamingWiki, the wiki about fixing PC games
Documentation for the above template (sometimes hidden from view).

Description

{{Glossary}} is a multi-purpose template used beneath glossary pages to power easily accessible display modes through a simple interface as well as manage populated data in the same way across multiple usages.


Overview

  1. {{Glossary}} (this template) provides and supports a few standardized parameters for glossary pages to populate data through a standardized interface, as well as defines a few different display modes to display said data in an appropriate format.
  2. Glossary:TERM page transcludes and populates the {{Glossary}} template with appropriate data.
    • Along with this they also use |display = {{{1|abbr}}} to set the display parameter to the first parameter used when transcluding the glossary page itself, or default to abbr if unset.
    • This allows for efficient transclusion of the relevant data through the glossary page itself. For example {{Glossary:Ultra-widescreen}} can be used to retrieve the default abbreviation link (ultra-widescreen), or {{Glossary:Ultra-widescreen|definition}} can be used to retrieve the definition (Ultra-widescreen is a term that refers to widescreen resolutions with an aspect ratio roughly wider than 2:1, and often marketed as "21:9".)
  3. Editors then use {{Glossary:TERM}} or {{Glossary:TERM|display mode}} on other pages to easily transclude the appropriate data as desired.


Arguments

Multiple arguments are supported, but almost all are optional; their use is determined by the glossary page itself. The only "user-facing" parameter among other pages than the glossary pages themselves is the display parameter which determines what display mode is being used.

  • display - The requested display mode. This should always be set to |display = {{{1|abbr}}} on glossary pages. This is to enable handing down the display parameter from the original page (whatever it might be), down through the associated glossary page and to this actual template.
  • name - The term itself. This is used for titles where appropriate as well as the target page used in abbreviated links and the like.
  • image - The file name of the image (under the File:XXXXX namespace) to use where appropriate.
  • image alt - The alt title of the image, shown while hovering with the mouse over it or when using a screen reader.
  • article - The page name of the article associated with the term. This is closely related to the glossary parameter.
  • category - The name of the category associated with the term.
  • glossary - The name of the glossary page that resides beneath the Glossary:XXXXX namespace. This is closely related to the article parameter.
  • list - The name of the list associated with the term.
  • cargo - Currently unused. Might be used in the future to document what Cargo table is associated with the term.
  • taxonomy - The taxonomy related category associated with the term.
  • definition - A short definition of the term and what it means.
  • examples - A few examples showcasing how the term relates to games.
  • notes - More in-depth notes regarding the term.


Supported display modes

  • abbr (default) - Outputs an abbreviated link in lowercase to the associated page (set through the name parameter on the glossary page).
    • Might be changed in the future to a separate link parameter, perhaps?
  • uc - Outputs the abbreviated link in non-lowercase (so typically normal case, with the first letter being uppercase).
  • image - Outputs the image associated with the term (set through the image parameter on the glossary page).
  • article - Outputs a link to the article page associated with the term (set through the article parameter on the glossary page).
  • list - Outputs a link to the list page associated with the term (set through the list parameter on the glossary page).
  • cargo - Outputs a link to the cargo table associated with the term (set through the cargo parameter on the glossary page).
  • category - Outputs a link to the category associated with the term (set through the category parameter on the glossary page).
  • taxonomy - Outputs a link to the taxonomy category associated with the term (set through the taxonomy parameter on the glossary page).
  • definition - Outputs the definition associated with the term (set through the definition parameter on the glossary page).
  • examples - Outputs the examples associated with the term (set through the examples parameter on the glossary page).
  • notes - Outputs the notes associated with the term (set through the notes parameter on the glossary page).
  • box - Outputs a customized infobox based on data provided to the template through the various other parameters.


Examples

  • See {{Glossary:Ultra-widescreen}} for a basic example that implements {{Glossary}} for regular use.
  • For a more advanced example, see how Taxonomy makes use of the {{Taxonomy/table/row}} template to populate multiple table cells with the desired available data from each retrieved glossary type. Instead of retrieving the data through different templates for each type of data that would need to be separately updated it instead makes calls to the same repository of data, that being the glossary page itself.


In-depth example #1

Typing this:
{{Glossary:Ultra-widescreen|definition}}
Will appear on the page like this: Ultra-widescreen is a term that refers to widescreen resolutions with an aspect ratio roughly wider than 2:1, and often marketed as "21:9".


In-depth example #2

Typing this:
{{Glossary:Ultra-widescreen|image}}
Will appear on the page like this: UWcomparison.png


In-depth example #3

Typing this:
{{Glossary:Ad-supported|examples}}
Will appear on the page like this:
  • NBA 2K20 video advertisements before playing a match.


In-depth example #4

Typing this:
{{Glossary:Ad-supported|category}}
Will appear on the page like this: Ad-supported


In-depth example #5

The box display mode is the most comprehensive one yet, and used to populate a lot of information about the term through an infobox.

Typing this:
{{Glossary:Ad-supported|box}}
Will appear on the page like this:
Ad-supported
Definition
Examples
Monetization
Ad-supported
DLC
Expansion pack
Free-to-play
Freeware
Sponsored
Subscription