Explain:Ship Navbox Templates

This page explains how to modify the ship navbox templates to add ships or change how these features display. See Common Templates#Ship Lists for a full list of these templates.

#### How Do I Add Ships?

First off, if all you need is to add a ship, you should add it to its "Faction-Specific Template" in that section below. For example, if the First Order gets a new ship, edit Template:Ships First Order to add it. Once you have its icon, also add that to Template:ShipLink (it's fine if it's missing, it'll just display a ? icon in the mean time).

#### Ship Navbox & List Template Structure

In case you ever need to modify any fundamentals, here's how these templates are structured.

##### List a Faction's Ship in a Template

Each Template:Ships (Faction) (for example, Template:Ships Galactic Empire) lists the ships for that faction in alphabetical order with a configurable separator, such as a newline, •, -, etc.

Open up one of those templates and you'll just see a bunch of ships listed in curly brackets to make them into links with icons (see Template:ShipLink), with a separator parameter that defaults to •. It's graciously low-tech which makes it easy to edit for updates, and the same template can either make a horizontal list of ships like A • B • C, or it can list them vertically with a newline, or perhaps even a table, depending on the separator passed to it.

##### Use the Template in a Faction Navbox

Navbox:Ships (Faction) (for example, Navbox:Ships Galactic Empire) calls into Template:Navbox Ships One Faction, passing in the faction name (it's really just a thin wrapper, and perhaps not entirely necessary?). That template then uses that faction name to form the name of the next template to call, "Ships (Faction)" above. The resulting ship list is shoved into "list1" of the Template:CollapsibleNavbox, along with also displaying the faction name in the navbox title etc.

The end result is a Navbox page that can be included in any other page with a single line, e.g. <nowiki>{{:Navbox:Ships Scum And Villainy}}</nowiki>.

##### Use the Templates in an All-Faction Navbox

Navbox:Ships does the same sort of thing, but calls into Template:Navbox Ships rather than the One-Faction template, so that we get the list of all ships. It's using the CollapsibleNavbox too but has one group per faction (instead of just group1 & list1).

#### Bringing It Together

The Ships page creates a table where each faction's cell is nothing more than a call to "Template:Ships (faction)" with a newline as the separator. So each faction's ship section is just a simple vertical list of ships.

The Ships navbox at the bottom of, say, Firespray-class Patrol Craft, just involves including the faction's navbox into the page: <nowiki>{{:Navbox:Ships Scum And Villainy}}</nowiki>. The default • separator results in a horizontal ship list in the collapsible navbox.

#### Why God Why!?

If all this sounds complicated, that's because it is. The goal of all that complexity is, ironically, simplicity: We only have to edit one template to add a ship, and doing so simultaneously updates both the Ships page and the ship list at the bottom of every ship page. Did the First Order get a new ship? Great! Create its page and add its link to Template:Ships First Order and everything updates!