Difference between revisions of "Template:Ship summary list"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
Line 1: Line 1:
 
<div class="toccolours inlineb" style="clear: left; margin: 0.5em auto; text-align: left; padding: 0em; border-radius: 4px; max-width: 94%; overflow: hidden">
 
<div class="toccolours inlineb" style="clear: left; margin: 0.5em auto; text-align: left; padding: 0em; border-radius: 4px; max-width: 94%; overflow: hidden">
 
<div style="padding-top: 0.2em; padding-bottom: 0.2em; background:#ccccff; font-weight:bold; text-align: center">  
 
<div style="padding-top: 0.2em; padding-bottom: 0.2em; background:#ccccff; font-weight:bold; text-align: center">  
{{#cargo_query: table=Starships
+
{{#expr: {{#cargo_query: tables=Starships|where=designation like "{{{tdes|BA}}}%"|fields=count(*)=ship_count|format=template|template=Ship summary list.display}}+{{#cargo_query: tables=Starships2|where=designation like "{{{tdes|BA}}}%"|fields=count(*)=ship_count|format=template|template=Ship summary list.display}} }} Representative {{{name|unknown}}} ({{{tdes|BA}}}) Classes</div><div style="font-size: 100%; padding: 0.5em 1em">
|fields=count(*)
+
{{#cargo_compound_query:
|where=designation like "{{{tdes|BB}}}%"
+
tables=Starships;where=designation like "{{{tdes|BA}}}%";fields=CONCAT('[[',_pageName,'|',name,']]')=Class, designation=Superclass, size=Tons, TL=TL, origin=Origin, jump=Jump, maneuver=G, canon=Canon
}} {{#cargo_query: table=Starships
+
|tables=Starships2;where=designation like "{{{tdes|BA}}}%";fields=CONCAT('[[',_pageName,'|',name,']]')=Class, designation=Superclass, format(size,2)=Tons, TL=TL, origin=Origin, jump=Jump, maneuver=G, canon=Canon
  |fields=CONCAT( '[[', _pageName, '|', name, ']]' )=Class,designation=Superclass,size=Tons,TL=TL,origin=Origin,jump=Jump,maneuver=G,canon=Canon
 
  |where=designation like "{{{tdes|BB}}}%"
 
 
   |format=dynamic table
 
   |format=dynamic table
   |rows per page=50
+
   |rows per page=100
  |intro=Representative {{{name|unknown}}} ({{{tdes|XX}}}) Classes</div><div style="font-size: 100%; padding: 0.5em 1em">
 
  |default=Representative {{{name|unknown}}} ({{{tdes|XX}}}) Classes</div><div>
 
 
}}
 
}}
 
</div></div><noinclude>
 
</div></div><noinclude>
 +
 
Generates a summary list of specific classes of starships in the library. This uses the [[Ship type codes]] designation as the driver for the ships selected.
 
Generates a summary list of specific classes of starships in the library. This uses the [[Ship type codes]] designation as the driver for the ships selected.
  
 
Parameters (both required):
 
Parameters (both required):
 
+
 
; name
 
; name
 
: Name of the class (e.g. Battleship)
 
: Name of the class (e.g. Battleship)

Revision as of 03:03, 8 June 2019

0 Representative unknown (BA) Classes
Class Superclass Tons TL Origin Jump G Canon
Class Superclass Tons TL Origin Jump G Canon

Generates a summary list of specific classes of starships in the library. This uses the Ship type codes designation as the driver for the ships selected.

Parameters (both required):

name
Name of the class (e.g. Battleship)
tdes
designation for the class (e.g. BB)

The template will show all of the pages using the Template: InfoboxShip template, and show some information from the template.