Template:Infobox: Difference between revisions

Current answers. Practical procedures. Reliable reference.
Jump to navigation Jump to search
Add generic reusable infobox template
 
Extend from 6 to 12 label/row pairs for the upcoming Engineer infobox (no CSS change needed -- .edfm-infobox-row isn't numbered)
Line 7: Line 7:
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label4|}}}</div><div class="edfm-infobox-value">{{{row4|}}}</div></div>}}{{#if:{{{row5|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label4|}}}</div><div class="edfm-infobox-value">{{{row4|}}}</div></div>}}{{#if:{{{row5|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label5|}}}</div><div class="edfm-infobox-value">{{{row5|}}}</div></div>}}{{#if:{{{row6|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label5|}}}</div><div class="edfm-infobox-value">{{{row5|}}}</div></div>}}{{#if:{{{row6|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label6|}}}</div><div class="edfm-infobox-value">{{{row6|}}}</div></div>}}
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label6|}}}</div><div class="edfm-infobox-value">{{{row6|}}}</div></div>}}{{#if:{{{row7|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label7|}}}</div><div class="edfm-infobox-value">{{{row7|}}}</div></div>}}{{#if:{{{row8|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label8|}}}</div><div class="edfm-infobox-value">{{{row8|}}}</div></div>}}{{#if:{{{row9|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label9|}}}</div><div class="edfm-infobox-value">{{{row9|}}}</div></div>}}{{#if:{{{row10|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label10|}}}</div><div class="edfm-infobox-value">{{{row10|}}}</div></div>}}{{#if:{{{row11|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label11|}}}</div><div class="edfm-infobox-value">{{{row11|}}}</div></div>}}{{#if:{{{row12|}}}|
<div class="edfm-infobox-row"><div class="edfm-infobox-label">{{{label12|}}}</div><div class="edfm-infobox-value">{{{row12|}}}</div></div>}}
</div><noinclude>
</div><noinclude>
== Usage ==
== Usage ==
Line 24: Line 30:
</pre>
</pre>


Up to 6 label/row pairs. Add more pairs in both this template and
Up to 12 label/row pairs (extended 2026-08-07 for the Engineer infobox,
[[MediaWiki:Common.css]] together if a future article genuinely needs
which needs around 10 — see [[Elite Dangerous Field Manual:Engineering
more than 6 — don't just extend the wikitext without extending the
Architecture]]). No matching CSS change was needed to extend this: the
matching CSS rows.
<code>.edfm-infobox-row</code> class in Common.css isn't numbered per-row,
so any number of rows renders correctly with the existing styles. If a
future article genuinely needs more than 12, add further
<code>rowN</code>/<code>labelN</code> pairs here the same way.


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 20:06, 7 August 2026

Infobox

Usage

A generic, right-floated reference infobox — styling lives in MediaWiki:Common.css (.edfm-infobox), not inline, so it stays consistent and easy to retheme later.

{{Infobox
 |name = Display title (defaults to the page name)
 |image = Filename.png (optional)
 |label1 = Type     |row1 = Multipurpose
 |label2 = Manufacturer |row2 = ...
 |label3 = ...      |row3 = ...
}}

Up to 12 label/row pairs (extended 2026-08-07 for the Engineer infobox, which needs around 10 — see [[Elite Dangerous Field Manual:Engineering Architecture]]). No matching CSS change was needed to extend this: the .edfm-infobox-row class in Common.css isn't numbered per-row, so any number of rows renders correctly with the existing styles. If a future article genuinely needs more than 12, add further rowN/labelN pairs here the same way.