Template:Portal
This template is used on 2,500,000 pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
This template is used to produce a link in a box to a portal.
Parameters
{{portal|Name|Image|size=Size |boxsize=Boxsize |break=yes |left=yes |margin=Margin |link=Target |alt=Alt text }}
The following parameters are available. They are all optional.
Name
- The name of the portal. This defaults to the current page's name.
Image
- The image to use for the portal's icon. This defaults to a generic image.
|size=Size
- The width of the icon, as an integer. This is in units of pixels. The default is 32. The icon is also constrained to be at most 28 pixels high.
|boxsize=Boxsize
- The width of the box, as an integer. This is in units of pixels. The default is to use a box wide enough to hold the text, if possible.
|break=yes
- In the text, put a line break between the portal's name and the word "portal".
|left=yes
- Float the box to the left instead of to the right.
|margin=Margin
- The margin around the box. By default, the box is surrounded by a margin of width 0.5em, but this can be customized using
|margin=top right bottom left
(e.g.,|margin=0.25em 0 0.25em 0.25em
) or removed using|margin=0
(zero).
|link=Target
- the link target for the image. If the target is empty, the image does not link to anything; if "
File:
", the image links to its file page; otherwise, the image links to the specified Wikipeda page or URL. The default is "File:
" ifImage
is specified, and is empty otherwise.Target
can be the name of a Wikipedia page, and it can be a URL. Normally the target should not also be a target of the adjacent text, as that would be overlinking. IfImage
or nonemptyTarget
is specified, nonemptyAlt text
should also be specified. The|link=
parameter should not be used if that would conflict with the licensing requirements of the image; see Purely decorative images.
|alt=Alt text
- The alt text for the image, for visually impaired readers; see Wikipedia:Alternative text for images. The default is empty. If
|link=File:
(orImage
without any use of the|link=
parameter) is specified, the alt text should describe the image's visual appearance; if|link=
specifies some other nonempty link target, the alt text should describe the icon's function.
Location
Within articles, this template is meant to be placed at the bottom of the article in the See also section.
Examples
Code |
Result |
---|---|
{{portal}} |
|
{{portal|Science}} |
|
{{portal|Spaceflight|RocketSunIcon.svg|alt=Rocket orbiting star}} |
|
{{portal|Spaceflight|RocketSunIcon.svg|link=}} |
|
{{portal|Spaceflight|RocketSunIcon.svg |link=Special:Search |alt=Search spaceflight portal }} |
|
{{portal|Science|size=15}} |
|
{{portal|Science|boxsize=50}} |
|
{{portal|Science|break=yes}} |
|
{{portal|Science|break=yes|left=yes}} |
See also
- {{portalbox}}
ar:قالب:بوابة be-x-old:Шаблён:Партал bs:Šablon:Portal ca:Plantilla:Portal cs:Šablona:Portál da:Skabelon:Portal de:Vorlage:Portal el:Πρότυπο:Portal hi:साँचा:Portal/doc es:Plantilla:Portal2 et:Mall:Portaal eo:Ŝablono:Portalo eu:Txantiloi:Atari fr:Modèle:Portail zh-classical:Template:門 he:תבנית:פורטל hr:Predložak:Portal hsb:Předłoha:Portal id:Templat:Wikiportal ia:Patrono:Portal it:Template:Portale ja:Template:ウィキポータルリンク ko:틀:들머리 lb:Template:Portal lt:Šablonas:Portal hu:Sablon:Portál mk:Шаблон:Портал mr:साचा:दालन ms:Templat:Portal nl:Sjabloon:Portaal no:Mal:Portal pl:Szablon:Portal pt:Predefinição:Portal ro:Format:Portal ru:Шаблон:Портал sq:Stampa:Portal sk:Šablóna:Portál sl:Predloga:Portal sr:Шаблон:Портал sh:Template:Portal fi:Malline:Teemasivu tl:Template:Portal vi:Tiêu bản:Portal tr:Şablon:Portal uk:Шаблон:Портал zh:Template:Portal
The above documentation is transcluded from Template:Portal/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |