Module:Portal/doc

From USApedia

This is the documentation page for Module:Portal

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

This module has two functions, portal and image. The portal produces a box with links to a portal or to multiple portals, and is used by the {{portal}} template. It is most often used in the "See also" section of an article. The image function produces the name of the image used by the specified portal.

See here, here, and here for test cases.

Portal function

The portal function produces a box of portal links.

This template is used to produce a link in a box to a portal or portals.

This template can be used to add multiple portal links to the "See also" section of an article.

Usage

This template can hold up to eighteen portal links.

{{Portal |Portal 1 |Portal 2 |... |Portal 18 }}

Location

Within articles, this template is meant to be placed at the bottom of the article in the See also section.

Image

The portal image defaults to one that is specified in Template:Portal/Images/PortalName for the portal, or a generic image. There is a list of all such images. Have in mind that the "PortalName" variable should only have an upper case letter at the first word, the second and later words should be written in lower case, regardless of how is the name of the portal actually written. For example, Portal:2016 Transition is written with two capital letters, but the subpage to host the image is Template:Portal/Images/2016 transition, with only one capital letter.

Example

Code
Result
{{Portal|Science}}

Maintenance

The following tracking category list instances where the template is used incorrectly:

See also

Purge this page to refresh

If this page has been recently modified, it may not reflect the most recent changes. Please purge this page to view the most recent changes.

Image function

The image function produces the name of the image used by the specified portal.

Usage

{{#invoke:Portal|image|portal}}

Example

  • {{#invoke:Portal|image|Art}}Lua error in package.lua at line 80: module 'Module:Portal/images/a' not found.

Image dupes function

The image dupes function returns a list of all images that are being used by more than one portal (aliases are not included). This can be helpful in identifying image entries that should be changed to use aliases.

Usage

{{#invoke:Portal|imageDupes}}

Display all function

The display all function returns a box containing all portals that have images. This is used for maintenance, and should not be displayed in articles, because a) there are around 1000 portals with images, and displaying 1000 images on one page takes up a lot of server resources, and b) the module has no way to know the correct capitalisation of a portal name, so some links to portals will be broken. The output of this function can be seen at Template:Portal/doc/all.

Usage

{{#invoke:Portal|displayAll}}