Template:Infobox role/doc: Difference between revisions
Appearance
m Link text |
m →Example: correct the page name |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
== Usage == | == Usage == | ||
The following is the base code required to generate an infobox. One can copy and paste the base code into an article and insert relevant information in front of the "=" signs. Removing HTML comments ("<!--", "-->" and anything between these two) is optional. To avoid accidental misuse, this base code does not have a handful of parameters that must be handled with absolute care and are not normally needed, such as {{param|bodystyle}}. | The following is the base code required to generate an infobox. One can copy and paste the base code into an article and insert relevant information in front of the "=" signs. Removing HTML comments ("<!--", "-->" and anything between these two) is optional. To avoid accidental misuse, this base code does not have a handful of parameters that must be handled with absolute care and are not normally needed, such as {{param|bodystyle}}. | ||
{{Parameter names example|_template=|title|image|alt|caption|created|role color|mentionable|obtainable}} | {{Parameter names example|_template=|title|image|alt|caption|created|role color|mentionable|obtainable|id}} | ||
<syntaxhighlight lang="html" style="overflow:auto;"> | <syntaxhighlight lang="html" style="overflow:auto;"> | ||
{{Infobox role | {{Infobox role | ||
Line 15: | Line 15: | ||
| mentionable = <!-- Yes/No --> | | mentionable = <!-- Yes/No --> | ||
| obtainable = <!-- Yes/No --> | | obtainable = <!-- Yes/No --> | ||
| id = | |||
}} | }} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 20: | Line 21: | ||
== Example == | == Example == | ||
{{hatnote|The following markup is included '''only for illustration purposes'''. It is not intended to provide up-to-date information about [[ | {{hatnote|The following markup is included '''only for illustration purposes'''. It is not intended to provide up-to-date information about [[Wiki Nerd]] and should not be updated for the sake of '''truth'''.}} | ||
{{Infobox role | {{Infobox role | ||
| title = Wiki Nerd | | title = Wiki Nerd | ||
Line 27: | Line 28: | ||
| mentionable = No | | mentionable = No | ||
| obtainable = Yes | | obtainable = Yes | ||
| id = 759189017035800646 | |||
}} | }} | ||
Line 36: | Line 38: | ||
| mentionable = No | | mentionable = No | ||
| obtainable = Yes | | obtainable = Yes | ||
| id = 759189017035800646 | |||
}} | }} | ||
</pre> | </pre> | ||
Line 68: | Line 71: | ||
; obtainable | ; obtainable | ||
: Whether specific steps can be taken to obtain the role. Format as Yes or No. | : Whether specific steps can be taken to obtain the role. Format as Yes or No. | ||
; id | |||
: The ID of the role. Used for linking to the appropriate page on the main site. | |||
Latest revision as of 00:37, 29 October 2020
![]() | This is a documentation subpage for Template:Infobox role It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
Usage
The following is the base code required to generate an infobox. One can copy and paste the base code into an article and insert relevant information in front of the "=" signs. Removing HTML comments ("<!--", "-->" and anything between these two) is optional. To avoid accidental misuse, this base code does not have a handful of parameters that must be handled with absolute care and are not normally needed, such as {{{bodystyle}}}
.
{{{title}}} | |
---|---|
[[File:{{{image}}}|frameless|alt={{{alt}}}]] {{{caption}}} | |
Date created | {{{created}}} |
Role color | #{{{role color}}} |
Anyone can mention | {{{mentionable}}} |
Obtainable | {{{obtainable}}} |
ID | {{{id}}} |
{{Infobox role
| title =
| image =
| alt =
| caption =
| created = <!-- {{start date and age|YYYY|MM|DD}} -->
| role color = <!-- RRGGBB -->
| mentionable = <!-- Yes/No -->
| obtainable = <!-- Yes/No -->
| id =
}}
Example
Wiki Nerd | |
---|---|
Date created | September 25, 2020 |
Role color | #f09727 |
Anyone can mention | No |
Obtainable | Yes |
ID | 759189017035800646 |
{{Infobox role | title = Wiki Nerd | created = {{start date and age|2020|09|25}} | role color = f09727 | mentionable = No | obtainable = Yes | id = 759189017035800646 }}
Parameters
All parameters are optional.
- title
- Name of the infobox.
- Attention: Please do not include a wikilink, Wikipedia:hyperlink or image in this parameter. This parameter should be composed of pure text.
- image
- Code for a small image to be displayed as roles's icon. You may specify a file name, with or without namespace prefix. In other words, the following examples are all acceptable:
- The GIMP icon - gnome.svg
- File:The GIMP icon - gnome.svg
- alt
- Alternative text of the image; very important.
- caption
- Caption of the image that appears below it. Should not be used to provide trivial captions, such as "This is the logo of X", which is automatically assumed. Reserved for special cases when a description beyond telling the obvious is needed, or for inserting {{ffdc}} or {{deletable image-caption}}.
- created
- The date the role was created, if known.
- The content of this field should look like the following:
{{Start date and age|year|month|day}}
- In case the article uses DMY as date format, use this code instead:
{{Start date and age|year|month|day|df=yes}}
- If you are unsure which date format to use, please consult Wikipedia:WP:MOSDATES.
- role color
- The color the role displays as, in hex triplet format. Omit the #
- mentionable
- Whether or not the role can be mentioned by everyone. Format as Yes or No.
- obtainable
- Whether specific steps can be taken to obtain the role. Format as Yes or No.
- id
- The ID of the role. Used for linking to the appropriate page on the main site.