Template:Listing

From Zelda Dungeon Wiki
Jump to navigation Jump to search


Purpose

Listing is used in "<Game> <Category>"-style listings (e.g. A Link Between Worlds Enemies) to manipulate the information such that it can be displayed in various ways. This base template is used only on listing pages, both to define information and to present it as a series of boxes. Listing/Gallery is used at the top of the listing page as well as on Category pages and on Game index pages. Listing/Navbox is used for navigation on all pages listed by the listing page.

Usage

Listing Pages

Listing pages have two sections. First, they use this template to define information about the articles to be listed. Second, they use peripheral templates to display the data on the page.

Definition

This section must be surrounded by <onlyinclude></onlyinclude> tags, as it will be transcluded by the other templates to present the information. The base Listing template is used for each entry in this section, as follows:

{{Listing
| link = 
| caption = 
| image = 
| desc = 
| link1 = 
| caption1 = 
| alt1 = 
| image1 = 
| desc1 = 
| ... = 
}}


  • link — The title of the article.
  • link — Alternate text for the link, if different from the article title. (Optional.)
  • image — The filename of an image to represent the article. To include the entry in the Gallery view, this is required, even if blank. To prevent the entry from appearing in the Gallery view (such as with a type of enemy which only exists in variations - the generic type needs an entry but should not be displayed in the Gallery view), omit this parameter.
  • desc — A description of the entry, which appears in the listing boxes.
  • link1... — Links to alternate versions of the entry, if they have different articles. In the Navbox view, variations will only be displayed if alternate links are defined (i.e. they have their own pages). (Optional.)
  • caption1... — Alternate texts for the variations, if different from the associated link. These may be included even without defining the associated link parameter. (Optional.)
  • alt1... — This is a short form of the variation, which appears in parentheses in the Navbox view. (e.g. "Keese (Dark, Fire, Thunder)") (Optional.)
  • image1... — Filenames for images of variations. In the Gallery view, variations will only be displayed if alternate images are defined, even if blank. (Optional.)
  • desc1... — Descriptions for the variations. (Optional.)

NOTE: Entries should not be separated by newlines. Instead, place the open braces of one entry immediately after the close braces of the preceding entry. The preceding entry's braces may be placed on a new line for improved readability, or they may be separated using <!-- --> comment tags.

To categorize entries - into headers on the listing page, tabs in the Gallery view, and rows in the Navbox view - simply precede each group with {{Listing| group=Groupname }}

Display

The next section uses the various peripheral templates described below to produce the layout of the listing page. Generally, nothing more than the following is required:

{{Float|left|__TOC__}}
{{Float|left|{{Listing/Gallery}}}}
{{Clear}}

{{Listing}}

Gallery View

Gallery View is generally used on Category pages and on Game index pages. To produce a Gallery View of a certain listing, use:

{{Listing/Gallery| game | category }}

Navbox View

Navbox View is generally used on each page listed on the listing page. To produce a Navbox View of a certain listing, use:

{{Listing/Navbox| game | category }}

Specialized Boxes

By default, a basic box is used on the listing pages, but the listing view supports specialized boxes for each listing if required. A specialized box for the listing "<game> <category>" can be created on "<game> <category>/Box" and it will automatically be used by this template. Boxes should utilize the {{Box}} template, but the content can be defined in any way. The specialized template will be passed the following parameters for use in displaying the data:

  • link
  • caption
  • file
  • desc

Use the default {{Listing/Box}} template as an example.