Line 56: |
Line 56: |
| | | |
| _footer_links = [=[*[[${fullpagename}/Gallery|View ${ship_name} CG]] | | _footer_links = [=[*[[${fullpagename}/Gallery|View ${ship_name} CG]] |
− | *[[${ship_code}|List of ${ship_type}s]] | + | *[[${ship_code}|List of ${ship_type}s]]${wikipedia}${extra_links}]=], |
− | *[[wikipedia:${wikipedia}|Wikipedia entry on ${ship_type} ${ship_name}]]${extra_links}]=], | + | |
| + | _wikipedia = [=[ |
| + | *[[wikipedia:${wikipedia}|Wikipedia entry on ${ship_type} ${ship_name}]]]=], |
| | | |
| _sandbox_notice = [=[<div style="width:90%; border:2px solid #aa5; background:#ffc; text-align:center; margin:15px auto 20px; padding:5px;">This is a testing ship page, it does not correspond to an actual ship.</div> | | _sandbox_notice = [=[<div style="width:90%; border:2px solid #aa5; background:#ffc; text-align:center; margin:15px auto 20px; padding:5px;">This is a testing ship page, it does not correspond to an actual ship.</div> |
Line 118: |
Line 120: |
| local ship = Ship(ship_name) | | local ship = Ship(ship_name) |
| local ship_type = ship:type() | | local ship_type = ship:type() |
| + | local name = ship:name() |
| + | local wikipedia = ship:wikipedia() |
| return format{ | | return format{ |
| ShipPage._footer_links, | | ShipPage._footer_links, |
| fullpagename = basepagename == "Sandbox" and ("Sandbox/" .. ship_name) or ship_name, | | fullpagename = basepagename == "Sandbox" and ("Sandbox/" .. ship_name) or ship_name, |
− | ship_name = ship:name(), | + | ship_name = name, |
| ship_code = Formatting:format_ship_code(ship_type), | | ship_code = Formatting:format_ship_code(ship_type), |
| ship_type = Formatting:format_ship_type(ship_type), | | ship_type = Formatting:format_ship_type(ship_type), |
− | wikipedia = ship:wikipedia(), | + | wikipedia = wikipedia and format{ |
| + | ShipPage._wikipedia, |
| + | ship_name = name, |
| + | ship_type = ship_type, |
| + | wikipedia = wikipedia |
| + | } or "", |
| extra_links = args.explicit.links and ("\n" .. args.explicit.links) or "" | | extra_links = args.explicit.links and ("\n" .. args.explicit.links) or "" |
| } | | } |