No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
<table class="infobox-table"> | <table class="infobox-table"> | ||
{{#if:{{{param1|}}}| | {{#if:{{{param1|}}}| <!-- If param1 is set, display the row --> | ||
<tr> | <tr> | ||
<th>{{{param1_name}}}</th> | <th>{{{param1_name|Param 1}}}</th> <!-- Default label for param1 --> | ||
<td>{{{param1}}}</td> | <td>{{{param1}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{param2|}}}| | {{#if:{{{param2|}}}| <!-- If param2 is set, display the row --> | ||
<tr> | <tr> | ||
<th>{{{param2_name}}}</th> | <th>{{{param2_name|Param 2}}}</th> | ||
<td>{{{param2}}}</td> | <td>{{{param2}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{param3|}}}| | {{#if:{{{param3|}}}| <!-- If param3 is set, display the row --> | ||
<tr> | <tr> | ||
<th>{{{param3_name}}}</th> | <th>{{{param3_name|Param 3}}}</th> | ||
<td>{{{param3}}}</td> | <td>{{{param3}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{param4|}}}| | {{#if:{{{param4|}}}| <!-- If param4 is set, display the row --> | ||
<tr> | <tr> | ||
<th>{{{ | <th>{{{param4_name|Param 4}}}</th> | ||
<td>{{{param4}}}</td> | <td>{{{param4}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{param5|}}}| | {{#if:{{{param5|}}}| <!-- If param5 is set, display the row --> | ||
<tr> | <tr> | ||
<th>{{{param5_name}}}</th> | <th>{{{param5_name|Param 5}}}</th> | ||
<td>{{{param5}}}</td> | <td>{{{param5}}}</td> | ||
</tr> | </tr> | ||
Line 46: | Line 46: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "An infobox | "description": "An infobox template with customizable parameters.", | ||
"params": { | "params": { | ||
" | "title": { | ||
"label": " | "label": "Title", | ||
"type": "string", | "type": "string", | ||
"default": " | "default": "{{PAGENAME}}", | ||
"description": "The title displayed at the top of the infobox." | |||
}, | |||
"subtitle": { | |||
"label": "Subtitle", | |||
"type": "string", | |||
"default": "", | |||
"description": "An optional subtitle for the infobox." | |||
}, | }, | ||
"image": { | "image": { | ||
"label": "Image", | "label": "Image", | ||
"type": "file", | "type": "file", | ||
"default": " | "default": "", | ||
"description": "Image file displayed in the infobox." | |||
}, | |||
"param1": { | |||
"label": "Parameter 1", | |||
"type": "string", | |||
"default": "", | |||
"description": "First parameter to display." | |||
}, | |||
"param1_name": { | |||
"label": "Parameter 1 Name", | |||
"type": "string", | |||
"default": "Param 1", | |||
"description": "Label for the first parameter." | |||
}, | |||
"param2": { | |||
"label": "Parameter 2", | |||
"type": "string", | |||
"default": "", | |||
"description": "Second parameter to display." | |||
}, | |||
"param2_name": { | |||
"label": "Parameter 2 Name", | |||
"type": "string", | |||
"default": "Param 2", | |||
"description": "Label for the second parameter." | |||
}, | |||
"param3": { | |||
"label": "Parameter 3", | |||
"type": "string", | |||
"default": "", | |||
"description": "Third parameter to display." | |||
}, | |||
"param3_name": { | |||
"label": "Parameter 3 Name", | |||
"type": "string", | |||
"default": "Param 3", | |||
"description": "Label for the third parameter." | |||
}, | |||
"param4": { | |||
"label": "Parameter 4", | |||
"type": "string", | |||
"default": "", | |||
"description": "Fourth parameter to display." | |||
}, | |||
"param4_name": { | |||
"label": "Parameter 4 Name", | |||
"type": "string", | |||
"default": "Param 4", | |||
"description": "Label for the fourth parameter." | |||
}, | |||
"param5": { | |||
"label": "Parameter 5", | |||
"type": "string", | |||
"default": "", | |||
"description": "Fifth parameter to display." | |||
}, | }, | ||
" | "param5_name": { | ||
"label": " | "label": "Parameter 5 Name", | ||
"type": "string", | "type": "string", | ||
"default": " | "default": "Param 5", | ||
"description": "Label for the fifth parameter." | |||
} | } | ||
} | } | ||
} | } | ||
</templatedata> | </templatedata> |
Revision as of 10:48, 2 October 2024
Infobox