Template:LocoInfobox: Difference between revisions
Quietrebel (talk | contribs) (initial template creation) |
Quietrebel (talk | contribs) No edit summary |
||
| Line 93: | Line 93: | ||
|} | |} | ||
</noinclude><includeonly><div class="railrosterdb-infobox loco-infobox" style="float:right; clear:right; margin:0 0 0 1em; width:280px; border:1px solid #aaa; background:#fff; font-size:0.9em; line-height:1.5;"> | </noinclude><includeonly><div class="railrosterdb-infobox loco-infobox" style="float:right; clear:right; margin:0 0 0 1em; width:280px; border:1px solid #aaa; background:#fff; font-size:0.9em; line-height:1.5;"> | ||
<!-- PROTOTYPE PHOTO / PLACEHOLDER --> | |||
{{#ifexist:File:Photo-Prototype-{{{loco_type_slug|}}}.jpg | |||
| [[File:Photo-Prototype-{{{loco_type_slug|}}}.jpg|278px|center|{{{loco_type|}}} prototype photo]] | |||
| <div style="background:#f8f9fa; border-bottom:1px solid #a2a9b1; padding:10px 8px; text-align:center; font-size:0.8em; color:#54595d;">No prototype photo yet — [{{fullurl:Special:Upload|wpDestFile=Photo-Prototype-{{{loco_type_slug|}}}.jpg}} Upload photo]</div> | |||
}} | |||
<!-- ROAD NAME LOGO / LABEL --> | <!-- ROAD NAME LOGO / LABEL --> | ||
Revision as of 16:01, 27 April 2026
Template:LocoInfobox
Universal infobox for individual product pages. Color is automatically determined by
the loco_category parameter via #switch. Never set color manually.
Called on every product page alongside
No model photo yet — Upload photo
Lionel Technical Features
Control Systems
Bluetooth
Legacy Control System
TMCC
LC Universal Remote
LC Individual Remote
Conventional
Features
Sound
Smoke Unit
Odyssey Speed Control
ElectroCoupler
directly
below it. No blank line between the two template calls — MediaWiki renders them as a visual stack: universal infobox on top, tech infobox directly below, both right-aligned.
The road name logo appears at the very top of the infobox. The template automatically constructs the filename from the road_name parameter. If no logo file exists, the road name is displayed as a text label.
Requires: ParserFunctions extension + $wgPFEnableStringFunctions = true
(for #replace to construct logo filenames).
Usage
{{LocoInfobox
| item_number =
| manufacturer =
| loco_type =
| wheel_arr =
| proto_manufacturer =
| loco_category =
| road_name =
| road_number =
| proto_era =
| year =
| catalog_season =
| product_line =
| scale =
| min_curve =
| run_type =
| msrp =
| notes =
}}
Parameters
| Parameter | Description | If Empty |
|---|---|---|
item_number |
Catalog item number | — |
manufacturer |
Manufacturer name; linked to manufacturer category page | — |
loco_type |
Linked to Loco Type category page | — |
wheel_arr |
Wheel arrangement; linked to Wheel Arr. category page for Steam, plain text for all others | — |
proto_manufacturer |
Prototype builder. Non-steam: linked to Proto Mfg category page. Steam/Other: plain text. | — |
loco_category |
Drives color scheme; linked to Loco Category page. Values: Steam, Diesel, Electric, Cab Car, Other | — |
road_name |
Linked to Road Name category page; drives logo display at top of infobox | — |
road_number |
Prototype road number on the model | — |
proto_era |
e.g. 1945–1964 | — |
year |
Catalog year; linked to Catalog Year category page | — |
catalog_season |
e.g. Vol 2 | — |
product_line |
Linked to Product Line category page | — |
scale |
Scale or Non-Scale; linked to Scale category page | — |
min_curve |
Minimum curve radius e.g. O36 | — |
run_type |
e.g. Catalog Run, Built to Order, Limited Run | — |
msrp |
Original retail price at release | — |
notes |
Free text notes from spreadsheet. Hidden entirely when empty. | (hidden) |
Color Reference
Colors applied automatically via loco_category. Do not set manually.
| loco_category | Header (dark) | Alt rows (light) |
|---|---|---|
| Steam | #6B1E2A | #F5E6E8 |
| Diesel | #4A4A4A | #F0F0F0 |
| Electric | #8B6914 | #FDF6D8 |
| Cab Car | #8B6914 | #FDF6D8 |
| Other / default | #1E2B7A | #D0D5F0 |