Template:Portal bar/doc: Difference between revisions
meta>Mr. Stradivarius update with border=no info |
meta>Mr. Stradivarius add TemplateData |
||
Line 50: | Line 50: | ||
*[[Template:Portal-inline]] | *[[Template:Portal-inline]] | ||
*[[Template:Subject bar]] | *[[Template:Subject bar]] | ||
{{cot|TemplateData}} | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"required": true, | |||
"type": "string/line", | |||
"description": "The first portal, without surrounding text. For example, use \"Science\" to display the science portal." | |||
}, | |||
"2": { | |||
"type": "string/line", | |||
"description": "The second portal." | |||
}, | |||
"3": { | |||
"type": "string/line", | |||
"description": "The third portal." | |||
}, | |||
"4": { | |||
"type": "string/line", | |||
"description": "The fourth portal" | |||
}, | |||
"5": { | |||
"type": "string/line", | |||
"description": "The fifth portal." | |||
}, | |||
"border": { | |||
"type": "string/line", | |||
"description": "Set this to \"no\" if you do not want to display a border around the portals. You can also use \"n\", \"false\", or \"0\"." | |||
} | |||
}, | |||
"description": "This template adds a bar of portals. It is usually used in the \"See also\" section of an article when using [[Template:Portal]] would cause formatting problems." | |||
} | |||
</templatedata> | |||
{{cob}} | |||
<includeonly> | <includeonly> |
Revision as of 10:14, 29 September 2013
This is a documentation subpage for Template:Portal bar. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
The primary purpose of this template is for when using {{Portal}} would cause formating problems.
For example sometimes images and infoboxes can push a regular {{portal}} outside of the See also section. This template doesn't have that problem.
Another example: This template is well suited for articles that have more portals than related articles in the "See also" section, which would cause a regular {{portal}} sprawl into the next section, although a regular {{portal}} with {{clear}} would sometimes work better depending on how much whitespace {{portal}} with {{clear}} would cause.
Usage
To add the template to a page, use the following code:
{{Portal bar|portal 1|portal 2|...}}
For a version with no border, use border=no:
{{Portal bar|portal 1|portal 2|...|border=no}}
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 name is found using Module:Portal. Please see Module:Portal#Image for instructions on how to add, update, or remove an image.
Examples
{{Portal bar|Biology|Fungi|Plants|Science}}
Produces:
{{Portal bar|Biology|Fungi|Plants|Science|border=no}}
Produces:
See also
TemplateData
| |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
This template adds a bar of portals. It is usually used in the "See also" section of an article when using [[Template:Portal]] would cause formatting problems.
|