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 3: Line 3:
 
{{#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">
 
{{#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">
 
  {{#cargo_compound_query:
 
  {{#cargo_compound_query:
  tables=Starships;where=designation like "{{{tdes|BA}}}%";fields=CONCAT('[[',_pageName,'|',name,']]')=Class, designation=Superclass, size=Tons, sizeCategory=Category, TL=TL, origin=Origin, jump=Jump, maneuver=G, canon=Canon
+
  tables=Starships;where=designation like "{{{tdes|BA}}}%";fields=CONCAT('[[',_pageName,'|',name,']]')=Class, designation=Superclass, size=Tons, CONCAT('[[', sizeCategory, ']]')=Category, TL=TL, CONCAT('[[', origin, ']]')=Origin, jump=Jump, maneuver=G, canon=Canon
  |tables=Starships2;where=designation like "{{{tdes|BA}}}%";fields=CONCAT('[[',_pageName,'|',name,']]')=Class, designation=Superclass, format(size,2)=Tons, sizeCategory=Category, TL=TL, origin=Origin, jump=Jump, maneuver=G, canon=Canon
+
  |tables=Starships2;where=designation like "{{{tdes|BA}}}%";fields=CONCAT('[[',_pageName,'|',name,']]')=Class, designation=Superclass, format(size,2)=Tons, CONCAT('[[', sizeCategory, ']]')=Category, TL=TL, CONCAT('[[', origin, ']]')=Origin, jump=Jump, maneuver=G, canon=Canon
 
   |format=dynamic table
 
   |format=dynamic table
 
   |rows per page=100
 
   |rows per page=100

Revision as of 03:02, 27 June 2019

0 Representative unknown (BA) Classes
Class Superclass Tons Category TL Origin Jump G Canon
Class Superclass Tons Category 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 or the Template:InfoboxShip2 template, and show some information from the template.