Module:Portal/doc

Jump to navigation Jump to search

This is the documentation page for Module:Portal

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.

Portal function[edit source]

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[edit source]

This template can hold up to eighteen portal links.

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

Location[edit source]

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

Image[edit source]

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:Buenos Aires is written with two capital letters, but the subpage to host the image is Template:Portal/Images/Buenos aires, with only one capital letter.

Example[edit source]

Code
Result
{{Portal|Science}}

Maintenance[edit source]

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

See also[edit source]



Image function[edit source]

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

Usage[edit source]

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

Example[edit source]

  • {{#invoke:Portal|image|Art}} → Ballerina-icon.jpg

Image dupes function[edit source]

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[edit source]

{{#invoke:Portal|imageDupes}}

Display all function[edit source]

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 1500 portals with images, and displaying 1500 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. This function can be seen at Template:Portal/doc/all.

Usage[edit source]

{{#invoke:Portal|displayAll}}

External links[edit source]