Open main menu

Template talk:Infobox service record

WikiProject Military history (Rated Template-Class)
MILHIST This template is within the scope of the Military history WikiProject. If you would like to participate, please visit the project page, where you can join the project and see a list of open tasks. To use this banner, please see the full instructions.
Temp Templates and modules do not require a rating on the quality assessment scale.

Use within a ship infobox?Edit

I don't know if the bold type for the field names, like "Commanders", "Victories", etc., is standard for other Military infoboxes, but used within ship infoboxes, the bold type stands out from other fields in other templates which are not in bold type. Should the bold type be tied to the "is_ship" field? Also, what about colons after the field names? — Bellhalla (talk) 19:16, 4 November 2008 (UTC)

Yes, the current format is standard in military infoboxes, but it would be fairly trivial to tie it to the ship control field. Just let me know what changes you'd like to take place when it's inside the ship infobox. Kirill (prof) 01:36, 5 November 2008 (UTC)
How about when "is_ship" is yes, make the field text not bold and add a colon at the end so it would be:
  • Victories:
rather than:
  • Victories
Also, could another field with a name along the lines of "is_multi" be added that would eliminate the final "|}" from the template? This would allow the template to be used in a ship infobox more than once or in a location other than the last 'slot' of the infobox, for example. (See Austro-Hungarian submarine U-XI for a manually coded example of why this would be useful.) Having this as a separate field, rather than being tied to "is_ship", would prevent the breakage of many instances already in use in ship infoboxes, but still allow the flexibility to use it as needed. Many thanks in advance. — Bellhalla (talk) 13:11, 6 November 2008 (UTC)
Ok, all done; please let me know if anything doesn't work as it should. Kirill (prof) 13:53, 6 November 2008 (UTC)
It looks like with "is_multi" set to yes that it's generating an extra "}" at the end. Take a look at Austro-Hungarian submarine U-XI (updated with the template) to see what it's doing. As it is now, there are two "}}" at the top of the article. Commenting out one instance generates only one "}". But, wow. That was fast. — Bellhalla (talk) 15:37, 6 November 2008 (UTC)
I got it fixed. Instead of interpreting the last part of the last conditional as "generate |} and close the conditional" it was interpreting it as "generate |, close the conditional, and generate }". I created a subtemplate at Template:Service record/CloseTable that generates the proper table close code and tested it in the template sandbox using test cases here and everything seemed to work. — Bellhalla (talk) 23:41, 6 November 2008 (UTC)
Return to "Infobox service record" page.