Template:Portal/doc: Difference between revisions
meta>Ceyockey moved includeonly segment to bottom and added a section name ... related to trying to get the TemplateData json to work in the visual editor |
meta>Mr. Stradivarius add {{lua}} template |
||
| Line 1: | Line 1: | ||
{{documentation subpage}} | {{documentation subpage}} | ||
{{high-risk|4,600,000+}} | {{high-risk|4,600,000+}} | ||
{{lua|Module:Portal}} | |||
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE.---> | <!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE.---> | ||
This template is used to produce a link in a box to a [[Portal:Contents/Portals|portal]] or portals. | This template is used to produce a link in a box to a [[Portal:Contents/Portals|portal]] or portals. | ||
Revision as of 13:12, 18 July 2013
| This is a documentation subpage for Template:Portal. It may contain usage information, categories and other content that is not part of the original template page. |
| This template is used on 9,340,000+ pages, or roughly 135677% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
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
- Basic usage
{{Portal |Portal 1 |Portal 2 |Portal 3 |... }}
- All options
{{Portal
| Portal 1
| Portal 2
| Portal 3
| ...
| left = <!-- yes -->
| margin = <!-- CSS margin -->
| break = <!-- yes -->
| boxsize = <!-- custom box width in pixels -->
}}
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: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
| Code |
Result |
|---|---|
{{Portal|Science}}
|
Parameters
| Name | Value | Description |
|---|---|---|
1, 2, 3 ... |
The portal name, e.g. Literature |
The positional parameters specify the portals to be displayed. An unlimited number are allowed. |
left |
yes |
If set to yes, the portal appears on the left side of the page instead of the right.
|
margin |
CSS margin value, e.g. 1.2em 3em 0.5em 1em |
This allows you to set a custom margin. All valid CSS margin values are accepted. |
break |
yes |
If set to yes, a line break is inserted after the portal name and before the word portal.
|
boxsize |
Size in pixels, e.g. 300 |
This sets a custom box width in pixels. |
Maintenance
The following tracking category lists instances where the template is used incorrectly:
TemplateData
A template to create a list of portals
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Portal (1) | 1 | Inserts the portal image and text. Further portals can be added to the template by increasing the number | String | required |
| Portal (2) | 2 | Insert the portal image and text | String | optional |
| Portal (3) | 3 | Insert the portal image and text | String | optional |
| Side | left | If set to yes, the portal appears on the left side of the page instead of the right.
| String | optional |
| Margin size | margin | Alters the margin size. Any valid CSS margin is accepted | Number | optional |
| Line break | break | If set to yes, a line break is inserted after the portal name and before the word portal | String | optional |
| Box size | boxsize | This sets a custom box width in pixels. | Number | optional |
See also