Template:Portal/doc: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Jmkim dot com No edit summary |
meta>Eubulides Document alt= and link=. |
||
Line 5: | Line 5: | ||
===Optional parameters=== | ===Optional parameters=== | ||
<nowiki>{{</nowiki>'''portal'''|name|image|size|boxsize|break=yes|left=yes|margin=}} | <nowiki>{{</nowiki>'''portal'''|name|image|size|boxsize|break=yes|left=yes|margin=|alt=|link=}} | ||
The units assumed for <code>size</code> (the width of the image) and <code>boxsize</code> (the width of the box containing the image and portal link) are pixels (px). By default, the box is surrounded by a margin of width 0.5em, but this can be customized using <code>margin=''top'' ''right'' ''bottom'' ''left''</code> (e.g. <code style="font-size:95%;">margin=0.25em 0 0.25em 0.25em</code>) or removed using <code>margin=0</code> (zero). | The units assumed for <code>size</code> (the width of the image) and <code>boxsize</code> (the width of the box containing the image and portal link) are pixels (px). By default, the box is surrounded by a margin of width 0.5em, but this can be customized using <code>margin=''top'' ''right'' ''bottom'' ''left''</code> (e.g. <code style="font-size:95%;">margin=0.25em 0 0.25em 0.25em</code>) or removed using <code>margin=0</code> (zero). | ||
As per [[WP:ALT]], when an image is specified then either <code>|alt=''Alt text''</code> or <code>|link=</code> should be specified, depending on whether the icon is an active link or is purely decorative. | |||
===Location=== | ===Location=== | ||
Line 22: | Line 24: | ||
| {{portal|Science}} | | {{portal|Science}} | ||
|- | |- | ||
| <small><pre>{{portal|Spaceflight|RocketSunIcon.svg}}</pre></small> | | <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|link=}}</pre></small> | ||
| {{portal|Spaceflight|RocketSunIcon.svg}} | | {{portal|Spaceflight|RocketSunIcon.svg}} | ||
|- | |- | ||
| <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|size=50}}</pre></small> | | <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|size=50|link=}}</pre></small> | ||
| {{portal|Spaceflight|RocketSunIcon.svg|size=50}} | | {{portal|Spaceflight|RocketSunIcon.svg|size=50}} | ||
|- | |- | ||
| <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|boxsize=50}}</pre></small> | | <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|boxsize=50|link=}}</pre></small> | ||
| {{portal|Spaceflight|RocketSunIcon.svg|boxsize=50}} | | {{portal|Spaceflight|RocketSunIcon.svg|boxsize=50}} | ||
|- | |- | ||
| <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|break=yes}}</pre></small> | | <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|break=yes|link=}}</pre></small> | ||
| {{portal|Spaceflight|RocketSunIcon.svg|break=yes}} | | {{portal|Spaceflight|RocketSunIcon.svg|break=yes}} | ||
|- | |- | ||
| <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|break=yes|left=yes}}</pre></small> | | <small><pre>{{portal|Spaceflight|RocketSunIcon.svg|break=yes|left=yes|link=}}</pre></small> | ||
| {{portal|Spaceflight|RocketSunIcon.svg|break=yes|left=yes}} | | {{portal|Spaceflight|RocketSunIcon.svg|break=yes|left=yes}} | ||
|} | |} |
Revision as of 20:16, 11 July 2009
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.
Optional parameters
{{portal|name|image|size|boxsize|break=yes|left=yes|margin=|alt=|link=}}
The units assumed for size
(the width of the image) and boxsize
(the width of the box containing the image and portal link) are pixels (px). 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).
As per WP:ALT, when an image is specified then either |alt=Alt text
or |link=
should be specified, depending on whether the icon is an active link or is purely decorative.
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|link=}} |
|
{{portal|Spaceflight|RocketSunIcon.svg|size=50|link=}} |
|
{{portal|Spaceflight|RocketSunIcon.svg|boxsize=50|link=}} |
|
{{portal|Spaceflight|RocketSunIcon.svg|break=yes|link=}} |
|
{{portal|Spaceflight|RocketSunIcon.svg|break=yes|left=yes|link=}} |
See also
- {{portalbox}}