Template:Portal/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Mdann52
m Adding TemplateData
meta>Krinkle
Line 83: Line 83:
         "description": "A template to create a list of portals",
         "description": "A template to create a list of portals",
         "params": {
         "params": {
                 "Portal 1": {
                 "1": {
                         "label": "Portal",
                         "label": "Portal (1)",
                         "description": "Inserts the Portal image and text. Further portals can be added to the template by increasing the number",
                         "description": "Inserts the portal image and text. Further portals can be added to the template by increasing the number",
                         "type": "string",
                         "type": "string",
                         "required": true
                         "required": true
                },
                "2": {
                        "label": "Portal (2)",
                        "description": "Insert the portal image and text",
                        "type": "string"
                },
                "3": {
                        "label": "Portal (3)",
                        "inherits": "2"
                 },
                 },
                 "left": {
                 "left": {
Line 93: Line 102:
                         "description": "If set to yes, the portal appears on the left side of the page instead of the right.",
                         "description": "If set to yes, the portal appears on the left side of the page instead of the right.",
                         "type": "string",
                         "type": "string",
                         "default": "no",
                         "default": "no"
                        "required": false
                 },
                 },
                 "margin": {
                 "margin": {
                         "label": "Margin size",
                         "label": "Margin size",
                         "description": "Alters the margin size. Any valid CSS margin is accepted",
                         "description": "Alters the margin size. Any valid CSS margin is accepted",
                         "type": "number",
                         "type": "number"
                        "required": false
                 },
                 },
                 "break": {
                 "break": {
                         "label": "line break",
                         "label": "Line break",
                         "description": "If set to yes, a line break is inserted after the portal name and before the word portal",
                         "description": "If set to yes, a line break is inserted after the portal name and before the word portal",
                         "type": "string",
                         "type": "string"
                        "required": false
                 },
                 },
                 "boxsize": {
                 "boxsize": {
                         "label": "box size",
                         "label": "Box size",
                         "description": "This sets a custom box width in pixels.",
                         "description": "This sets a custom box width in pixels.",
                         "type": "number",
                         "type": "number"
                        "required": false
                 }
                 }
         }
         }
}
}
</templatedata>
</templatedata>

Revision as of 00:12, 2 July 2013

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

This template can be used to add multiple portal links to the "See also" section of an article.

Usage

Basic usage
{{Portal |Portal 1 |Portal 2 |Portal 3 |... }}
All options
{{Portal 
 | Portal 1 
 | Portal 2 
 | Portal 3 
 | ... 
 | left = <!-- yes -->
 | margin = <!-- CSS margin -->
 | break = <!-- yes -->
 | boxsize = <!-- custom box width in pixels -->
}}

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 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. Have in mind that the "PortalName" variable should only have an upper case letter at the first word, the second and later words should be written in lower case, regardless of how is the name of the portal actually written. For example, Portal:Buenos Aires is written with two capital letters, but the subpage to host the image is Template:Portal/Images/Buenos aires, with only one capital letter.

Example

Code
Result
{{Portal|Science}}

Parameters

Name Value Description
1, 2, 3 ... The portal name, e.g. Literature The positional parameters specify the portals to be displayed. An unlimited number are allowed.
left yes If set to yes, the portal appears on the left side of the page instead of the right.
margin CSS margin value, e.g. 1.2em 3em 0.5em 1em This allows you to set a custom margin. All valid CSS margin values are accepted.
break yes If set to yes, a line break is inserted after the portal name and before the word portal.
boxsize Size in pixels, e.g. 300 This sets a custom box width in pixels.

Maintenance

The following tracking category lists instances where the template is used incorrectly:

See also


A template to create a list of portals

Template parameters

ParameterDescriptionTypeStatus
Portal (1)1

Inserts the portal image and text. Further portals can be added to the template by increasing the number

Stringrequired
Portal (2)2

Insert the portal image and text

Stringoptional
Portal (3)3

Insert the portal image and text

Stringoptional
Sideleft

If set to yes, the portal appears on the left side of the page instead of the right.

Default
no
Stringoptional
Margin sizemargin

Alters the margin size. Any valid CSS margin is accepted

Numberoptional
Line breakbreak

If set to yes, a line break is inserted after the portal name and before the word portal

Stringoptional
Box sizeboxsize

This sets a custom box width in pixels.

Numberoptional