Template:Infobox-chapter: Difference between revisions

m Fix: newline before {| (templatestyles broke table parse); use name param in header; drop redundant Name row
m Add list_of_honor param: gold outline + caption + auto-category for List of Honor ships
Line 1: Line 1:
<includeonly><templatestyles src="Infobox-chapter/styles.css" />
<includeonly><templatestyles src="Infobox-chapter/styles.css" />
{| class="sidebar tf-cbox"
{| class="sidebar tf-cbox{{#if:{{{list_of_honor|}}}| tf-cbox-loh}}"
|-  
|-  
| class="tf-cbox-name tf-b-{{lc:{{{branch|default}}}}}" colspan="2" | '''{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}'''{{#if:{{{hcn|}}}|<br/><span class="tf-cbox-hcn">{{{hcn}}}</span>}}
| class="tf-cbox-name tf-b-{{lc:{{{branch|default}}}}}" colspan="2" | '''{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}'''{{#if:{{{hcn|}}}|<br/><span class="tf-cbox-hcn">{{{hcn}}}</span>}}
Line 58: Line 58:
{{#if: {{{altimage|}}}|
{{#if: {{{altimage|}}}|
{{!}} class="tf-cbox-img" colspan="2" {{!}} {{{altimage}}}}}
{{!}} class="tf-cbox-img" colspan="2" {{!}} {{{altimage}}}}}
|- valign="top"
{{#if: {{{list_of_honor|}}}|
{{!}} class="tf-cbox-loh-cap" colspan="2" {{!}} [[List of Honor|&#9733; List of Honor]]}}
|}
|}
[[Category:Chapters|{{{name}}}]]</includeonly><noinclude>
[[Category:Chapters|{{{name}}}]]{{#if:{{{list_of_honor|}}}|[[Category:List of Honor|{{{name}}}]]}}</includeonly><noinclude>


==Usage==
==Usage==
Line 129: Line 132:
| website
| website
| Type in the exact URL.  Will be <nowiki>[[linked]]</nowiki> automatically.
| Type in the exact URL.  Will be <nowiki>[[linked]]</nowiki> automatically.
|-
| list_of_honor
| Set to the enrollment year (e.g. <code>2023</code>) when the ship is enrolled on the [[List of Honor]]. Gives the infobox a gold outline + "List of Honor" caption and files the page in [[:Category:List of Honor]]. Leave blank otherwise.
|-
|-
| image2 / altimage
| image2 / altimage