Module:Portal/doc
This is the documentation page for Module:Portal
This is a documentation subpage for Module:Portal. It contains usage information, categories and other content that is not part of the original module page. |
This Lua module is used on approximately 7,260,000 pages, which is ≈57691% of all pages. To avoid large-scale disruption and unnecessary server load, any changes to it should first be tested in the module's /sandbox or /testcases subpages. The tested changes can then be added to this page in a single edit. Please consider discussing changes on the talk page before implementing them. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
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 is a documentation subpage for Module:Portal. It contains usage information, categories and other content that is not part of the original module page. |
This Lua module is used on 4,300,000+ pages. To avoid large-scale disruption and unnecessary server load, any changes to it should first be tested in the module's /sandbox or /testcases subpages. The tested changes can then be added to this page in a single edit. Please consider discussing changes on the talk page before implementing them. |
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]
- Module:Portal/doc at Wikipedia, the free Terran-based encyclopedia that anyone can edit.