Template:Infobox: Difference between revisions

Template page
No edit summary
Tag: Reverted
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 2: Line 2:


<div class="infobox">
<div class="infobox">
  <div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>
    {{#if:{{{image|}}}|<div class="infobox-image">[[File:{{PAGENAME:{{{image}}}}}|200px]]</div>}}
  {{#if: {{{image|}}} |
    <div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>
  <div class="infobox-image">[[File:{{{image}}}|300px]]</div>
    <div class="infobox-subtitle">{{{subtitle|}}}</div>
  }}
 
  <table class="infobox-table">
    <table class="infobox-table">
    {{#if: {{{param1|}}} |
        {{#if:{{{param1|}}}| <!-- If param1 is set, display the row -->
    <tr>
            <tr>
      <th>Parameter 1</th>
                <th>{{{param1_name|Param 1}}}</th> <!-- Default label for param1 -->
      <td>{{{param1}}}</td>
                <td>{{{param1}}}</td>
    </tr>
            </tr>
    }}
        }}
    {{#if: {{{param2|}}} |
 
    <tr>
        {{#if:{{{param2|}}}| <!-- If param2 is set, display the row -->
      <th>Parameter 2</th>
            <tr>
      <td>{{{param2}}}</td>
                <th>{{{param2_name|Param 2}}}</th>
    </tr>
                <td>{{{param2}}}</td>
    }}
            </tr>
    {{#if: {{{param3|}}} |
        }}
    <tr>
 
      <th>Parameter 3</th>
        {{#if:{{{param3|}}}| <!-- If param3 is set, display the row -->
      <td>{{{param3}}}</td>
            <tr>
    </tr>
                <th>{{{param3_name|Param 3}}}</th>
    }}
                <td>{{{param3}}}</td>
    {{#if: {{{param4|}}} |
            </tr>
    <tr>
        }}
      <th>Parameter 4</th>
 
      <td>{{{param4}}}</td>
        {{#if:{{{param4|}}}| <!-- If param4 is set, display the row -->
    </tr>
            <tr>
    }}
                <th>{{{param4_name|Param 4}}}</th>
    {{#if: {{{param5|}}} |
                <td>{{{param4}}}</td>
    <tr>
            </tr>
      <th>Parameter 5</th>
        }}
      <td>{{{param5}}}</td>
 
    </tr>
        {{#if:{{{param5|}}}| <!-- If param5 is set, display the row -->
    }}
            <tr>
  </table>
                <th>{{{param5_name|Param 5}}}</th>
                <td>{{{param5}}}</td>
            </tr>
        }}
    </table>
</div>
</div>
<noinclude>
<templatedata>
{
"description": "An infobox template with customizable parameters.",
"params": {
"title": {
"label": "Title",
"type": "string",
"default": "{{PAGENAME}}",
"description": "The title displayed at the top of the infobox."
},
"subtitle": {
"label": "Subtitle",
"type": "string",
"description": "An optional subtitle for the infobox."
},
"image": {
"label": "Image",
"type": "string",
"description": "Image file displayed in the infobox."
},
"param1": {
"label": "Parameter 1 Value",
"type": "string",
"description": "First parameter to display."
},
"param1_name": {
"label": "Parameter 1 Name",
"type": "string",
"description": "Label for the first parameter."
},
"param2": {
"label": "Parameter 2 Value",
"type": "string",
"description": "Second parameter to display."
},
"param2_name": {
"label": "Parameter 2 Name",
"type": "string",
"description": "Label for the second parameter."
},
"param3": {
"label": "Parameter 3 Value",
"type": "string",
"description": "Third parameter to display."
},
"param3_name": {
"label": "Parameter 3 Name",
"type": "string",
"description": "Label for the third parameter."
},
"param4": {
"label": "Parameter 4 Value",
"type": "string",
"description": "Fourth parameter to display."
},
"param4_name": {
"label": "Parameter 4 Name",
"type": "string",
"description": "Label for the fourth parameter."
},
"param5": {
"label": "Parameter 5 Value",
"type": "string",
"description": "Fifth parameter to display."
},
"param5_name": {
"label": "Parameter 5 Name",
"type": "string",
"description": "Label for the fifth parameter."
}
},
"paramOrder": [
"title",
"subtitle",
"image",
"param1_name",
"param1",
"param2_name",
"param2",
"param3_name",
"param3",
"param4_name",
"param4",
"param5_name",
"param5"
]
}
</templatedata>
</noinclude>

Latest revision as of 10:55, 2 October 2024

Infobox


An infobox template with customizable parameters.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Titletitle

The title displayed at the top of the infobox.

Default
{{PAGENAME}}
Stringoptional
Subtitlesubtitle

An optional subtitle for the infobox.

Stringoptional
Imageimage

Image file displayed in the infobox.

Stringoptional
Parameter 1 Nameparam1_name

Label for the first parameter.

Stringoptional
Parameter 1 Valueparam1

First parameter to display.

Stringoptional
Parameter 2 Nameparam2_name

Label for the second parameter.

Stringoptional
Parameter 2 Valueparam2

Second parameter to display.

Stringoptional
Parameter 3 Nameparam3_name

Label for the third parameter.

Stringoptional
Parameter 3 Valueparam3

Third parameter to display.

Stringoptional
Parameter 4 Nameparam4_name

Label for the fourth parameter.

Stringoptional
Parameter 4 Valueparam4

Fourth parameter to display.

Stringoptional
Parameter 5 Nameparam5_name

Label for the fifth parameter.

Stringoptional
Parameter 5 Valueparam5

Fifth parameter to display.

Stringoptional