User:Iohanen/Template:Infobox
Tutorial
[edit | edit source]Firstly when you start editing the template (please copy it and create a page for it on your wiki as Template:Wx/xyz/Template_name, Wx meaning your type of project and xyz your language code), you may want to activate syntax highlighting for a better vision of the code. You will need to translate every part of the code that is under {{{TEXT}}}
(generally orange coloured with Syntax Highlighting), and also parts that are {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Text'''
(translate where it says "Text"; {{!}}
is generally dark-red coloured in Syntax Highlighting).
Every {{{TEXT}}}
will be a parameter that is used when you invoke the template in the article/page, as shown below:
{{Wx/xyz/Template name | TEXT = Parameter information | IMAGE = Name of the image.png | IMAGE-SIZE = 111px (Size of the image)
And every {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Text'''
will be the text of the box that describes the information of the parameter, it can only be modified in the code so you need to be careful.
Source code
[edit | edit source]<onlyinclude><includeonly>{| class="infobox wikitable float-right toptextcells" style="width:330px; font-size:95%; margin-top:0;float:right;align:right" {{#if:{{{NAME|}}}| {{!}} colspan="4" style="background-color: #A9BEC7;text-align:center; font-size:140%; font-weight:bold;" {{!}} {{{NAME|{{PAGENAME}}}}} }} |- {{#if:{{{TRANSCRIPTION|}}}| {{!}} colspan="2" style="text-align:center; font-size:100%; font-weight:bold;" {{!}}<hr style="width:100%;" />{{{TRANSCRIPTION}}} }} |- |colspan="2" style="text-align:center;background:#EEEEEE;"| {| style="width:100%; border:none; margin:0; padding:0;" | style="text-align:center; width:100%;background:#EEEEEE;" |{{#if: {{{IMAGE|}}}|[[File:{{{IMAGE}}}|border|center|{{{IMGSIZE|200px}}}|alt={{{IMAGE-ALT}}}<!-- -->]]}} |- valign="middle" | style="text-align:center;"|{{#if:{{{IMAGE-TEXT|}}}|{{{IMAGE-TEXT}}}}} |} |- <!-- Persenliche Informazione --> {{!}} colspan="3" style="text-align:center;background-color: #A9BEC7;font-size:130%" {{!}} '''Personal Information''' |- {{#if:{{{SPOUSE|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Spouse''' {{!}} {{{SPOUSE}}} }} |- {{#if:{{{DESCENDANTS|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Descendants''' {{!}} {{{DESCENDANTS}}} }} |- {{#if:{{{BORN|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Born''' {{!}} {{{BORN}}} }} |- {{#if:{{{DIED}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Died''' {{!}} {{{DIED}}} }} |- {{#if:{{{BURIAL|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Burial''' {{!}} {{{BURIAL}}} }} |- {{#if:{{{FATHER|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Father''' {{!}} {{{FATHER}}} }} |- {{#if:{{{MOTHER|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Mother''' {{!}} {{{MOTHER}}} }} |- {{#if:{{{RELIGION|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Religion''' {{!}} {{{RELIGION}}} }} |- {{#if:{{{SIGNATURE|}}}| {{!}} class="ibleft" style="vertical-align:top;" {{!}} '''Signature''' {{!}} [[File:{{{SIGNATURE}}}|center|{{{SIZE-SIG|150px}}}]] }} |}
Many of the parameters (like {{SIGNATURE}}
) are in capslock, so that it's easy to understand them.
Example
[edit | edit source]Someone in its native language | |||
Someone in your project's language | |||
| |||
Personal Information | |||
Spouse | Someonin | ||
Descendants | Someone Jr. Someonin Jr. | ||
Born | 14. May, 1970 | ||
Died | 14. May, 2020 | ||
Burial | Any place, in any city, in any country | ||
Father | Someone's Father | ||
Mother | Someone's Mother | ||
Religion | Someone's Religion | ||
Signature |
Notes
[edit | edit source]This template is based on the German Wikipedia infobox templates, like w:de:Vorlage:Infobox Staat. It is very simple, easy to expand and to create new parameters.