Template:Portal/doc: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
No edit summary |
meta>Svick Reverted 3 edits by 122.165.55.90; Editing test. (TW) |
||
| Line 1: | Line 1: | ||
{{documentation subpage}} | {{documentation subpage}} | ||
<includeonly>{{high-risk|2,700,000}}</includeonly> | <includeonly>{{high-risk|2,700,000}}</includeonly> | ||
<!---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:List of portals|portal]]. | |||
=== | ===Parameters=== | ||
: <code>'''<nowiki>{{</nowiki>Portal|<var>Name</var>|size=<var>Size</var>|boxsize=<var>Boxsize</var>|break=yes|left=yes|margin=<var>Margin</var>|link=<var>Target</var>}}'''</code> | |||
; <code><var>Name</var></code> : The name of the portal. <!-- This defaults to the current page's name - true but lets not encourage this. If pages or sections are moved or copied stuff breaks. --> | |||
The following additional parameters are available. They are all optional, the default values are chosen to give a good look and feel across the encylopedia and should not be overridden without good reason. | |||
; {{Para|size|<var>Size</var>}} : The width of the icon, as an integer. This is in units of pixels. The default is 28 times the [[image aspect ratio]], which produces an image 28 pixels high. | |||
< | |||
</ | |||
; {{Para|boxsize|<var>Boxsize</var>}} : 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. | |||
; {{Para|break|yes}} : In the text, put a line break between the portal's name and the word "portal". | |||
; {{Para|left|yes}} : Float the box to the left instead of to the right. | |||
; {{Para|margin|<var>Margin</var>}} : The margin around the box. By default, the box is surrounded by a margin of width 0.5em, but this can be customized using {{para|margin|<var>top right bottom left</var>}} (''e.g.'', {{para|margin|0.25em 0 0.25em 0.25em}}) or removed using {{para|margin|0}} (zero). | |||
; {{Para|link|<var>Target</var>}} : the link target for the image. If the target is empty, the image does not link to anything; if "<code>File:</code>", the image links to its file page; otherwise, the image links to the specified Wikipeda page or URL. The default is "<code>File:</code>" if <code><var>Image</var></code> is specified, and is empty otherwise. <code><var>Target</var></code> 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 [[WP:OVERLINKING|overlinking]]. If <code><var>Image</var></code> or nonempty <code><var>Target</var></code> is specified, nonempty <code><var>Alt text</var></code> should also be specified. The {{para|link}} parameter should not be used if that would conflict with the licensing requirements of the image; see ''[[Wikipedia:Alternative text for images #Purely decorative images|Purely decorative images]]''. | |||
===Images=== | |||
The portal image defaults to one that is specified in Template:Portal/Images/PortalName for the portal, or a generic image. There is a [[Template:Portal/Images|list of all such images]]. | |||
'' | ===Location=== | ||
Within articles, this template is meant to be placed at the bottom of the article in the ''See also'' section. | |||
===Examples=== | |||
{| style="background:transparent;" | |||
|- style="font-size:120%;" | |||
! Code<hr/> !! Result<hr/> | |||
|- | |||
| <small><pre>{{Portal|Science}}</pre></small> | |||
| {{Portal|Science}} | |||
|- | |||
| <small><pre>{{Portal|Spaceflight|link=}}</pre></small> | |||
| {{Portal|Spaceflight|link=}} | |||
|- | |||
| <small><pre>{{Portal|Spaceflight|link=Special:Search}}</pre></small> | |||
| {{Portal|Spaceflight|link=Special:Search}} | |||
|- | |||
| <small><pre>{{Portal|Science|size=15}}</pre></small> | |||
| {{Portal|Science|size=15}} | |||
|- | |||
| <small><pre>{{Portal|Science|boxsize=50}}</pre></small> | |||
| {{Portal|Science|boxsize=50}} | |||
|- | |||
| <small><pre>{{Portal|Science|break=yes}}</pre></small> | |||
| {{Portal|Science|break=yes}} | |||
|- | |||
| <small><pre>{{Portal|Science|break=yes|left=yes}}</pre></small> | |||
| {{Portal|Science|break=yes|left=yes}} | |||
|} | |||
===See also=== | |||
* {{Tl|Portal box}} | |||
{{ | |||
<includeonly> | |||
{{ | <!--Categories--> | ||
[[Category:Wikipedia Portal navflags| ]] | |||
[[Category:Internal link templates]] | |||
[[Category:Exclude in print|{{PAGENAME}}]] | |||
[[ | <!--Interwikis--> | ||
[[ | [[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]] | |||
[[hy:Կաղապար:Պորտալ]] | |||
[[mk:Шаблон:Портал]] | |||
[[mr:साचा:दालन]] | |||
[[ms:Templat:Portal]] | |||
[[nl:Sjabloon:Link 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]] | |||
[[ta:வார்ப்புரு:வலைவாசல்]] | |||
[[tl:Template:Portal]] | |||
[[tr:Şablon:Portal]] | |||
[[uk:Шаблон:Портал]] | |||
[[vi:Tiêu bản:Portal]] | |||
[[zh:Template:Portal]] | |||
</includeonly> | |||
Revision as of 19:39, 10 October 2010
| 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 to produce a link in a box to a portal.
Parameters
{{Portal|Name|size=Size|boxsize=Boxsize|break=yes|left=yes|margin=Margin|link=Target}}
Name- The name of the portal.
The following additional parameters are available. They are all optional, the default values are chosen to give a good look and feel across the encylopedia and should not be overridden without good reason.
|size=Size- The width of the icon, as an integer. This is in units of pixels. The default is 28 times the image aspect ratio, which produces an image 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:" ifImageis specified, and is empty otherwise.Targetcan 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. IfImageor nonemptyTargetis specified, nonemptyAlt textshould 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.
Images
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.
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|Science}}
|
|
{{Portal|Spaceflight|link=}}
|
|
{{Portal|Spaceflight|link=Special:Search}}
|
|
{{Portal|Science|size=15}}
|
|
{{Portal|Science|boxsize=50}}
|
|
{{Portal|Science|break=yes}}
|
|
{{Portal|Science|break=yes|left=yes}}
|
See also
- {{Portal box}}