Line 60: |
Line 60: |
| | | |
| function ShipPage:format_ship_infoboxes() | | function ShipPage:format_ship_infoboxes() |
− | local forms = ship_remodel_forms(self._vars.ship_key) | + | local forms = ship_remodel_forms(self._vars.ship_name) |
| local infoboxes = {} | | local infoboxes = {} |
| for i, form in ipairs(forms) do | | for i, form in ipairs(forms) do |
Line 76: |
Line 76: |
| end | | end |
| | | |
− | function ShipPage:format_header(ship_key, basepagename) | + | function ShipPage:format_header(ship_key, ship_name, basepagename) |
| self._vars = { | | self._vars = { |
| ship_key = ship_key, | | ship_key = ship_key, |
| + | ship_name = ship_name, |
| clear = Formatting:clear(), | | clear = Formatting:clear(), |
| } | | } |
Line 89: |
Line 90: |
| function ShipPage.Header(frame, args) | | function ShipPage.Header(frame, args) |
| args = args or Utils.getTemplateArgs(frame) | | args = args or Utils.getTemplateArgs(frame) |
− | local ship_key = args.explicit.ship or args.implicit.pagename or "" | + | local ship_name = args.explicit.ship or args.implicit.pagename or "" |
− | if not args.explicit.ship and args.implicit.pagename and args.implicit.basepagename == "Sandbox" then | + | ship_key = ship_name .. "/" |
− | ship_key = ship_key .. "/"
| + | return ShipPage:format_header(ship_key, ship_name, args.implicit.basepagename) |
− | end
| |
− | return ShipPage:format_header(ship_key, args.implicit.basepagename) | |
| end | | end |
| | | |
Line 99: |
Line 98: |
| args = args or Utils.getTemplateArgs(frame) | | args = args or Utils.getTemplateArgs(frame) |
| local ship_key = args.explicit.ship or args.implicit.pagename or "" | | local ship_key = args.explicit.ship or args.implicit.pagename or "" |
− | if not args.explicit.ship and args.implicit.pagename and args.implicit.basepagename == "Sandbox" then | + | ship_key = ship_key .. "/" |
− | ship_key = ship_key .. "/"
| |
− | end
| |
| local ship = Ship(ship_key) | | local ship = Ship(ship_key) |
| local ship_type = ship:type() | | local ship_type = ship:type() |
Line 118: |
Line 115: |
| args = args or Utils.getTemplateArgs(frame) | | args = args or Utils.getTemplateArgs(frame) |
| local ship_key = args.explicit.ship or args.implicit.pagename or "" | | local ship_key = args.explicit.ship or args.implicit.pagename or "" |
− | if not args.explicit.ship and args.implicit.pagename and args.implicit.basepagename == "Sandbox" then | + | ship_key = ship_key .. "/" |
− | ship_key = ship_key .. "/"
| |
− | end
| |
| local ship = Ship(ship_key) | | local ship = Ship(ship_key) |
| return ship:class() and ship:class():name_override() or "Unknown Class" | | return ship:class() and ship:class():name_override() or "Unknown Class" |