Template:Portal/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Rich Farmbrough
Left and break are unused.
meta>Rich Farmbrough
Link is only relevant with image.
Line 5: Line 5:


===Parameters===
===Parameters===
: <code>'''<nowiki>{{</nowiki>Portal|<var>Name 1</var>|<var>Name 2</var>|<var>Name 3</var>...|size=<var>Size</var>|boxsize=<var>Boxsize</var>|margin=<var>Margin</var>|link=<var>Target</var>}}'''</code>
: <code>'''<nowiki>{{</nowiki>Portal|<var>Name 1</var>|<var>Name 2</var>|<var>Name 3</var>...|size=<var>Size</var>|boxsize=<var>Boxsize</var>|margin=<var>Margin</var>}}'''</code>


; <code><var>Name</var></code> : The name of the portal.  If multiple portal names are used the other parameters will be ignored.
; <code><var>Name</var></code> : The name of the portal.  If multiple portal names are used the other parameters will be ignored.
Line 14: Line 14:


; {{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|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|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===
===Images===

Revision as of 13:17, 19 October 2010

This template is used to produce a link in a box to a portal or portals.

Parameters

{{Portal|Name 1|Name 2|Name 3...|size=Size|boxsize=Boxsize|margin=Margin}}
Name
The name of the portal. If multiple portal names are used the other parameters will be ignored.

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.
|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).

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