Wikia

Nukapedia

Help with tables in infobox

17,513pages on
this wiki

Forum page

Forums: Index > Wiki discussion > Help with tables in infobox
Icon nowrite
This forum page has been archived. Please do not make any further edits unless they are for maintenance purposes.
 
Gametitle-Wiki
Gametitle-Wiki

So I was trying to put an infobox on pages for military conflicts to bring them in line with the rest of the wiki, and as an infobox doesn't exist I figured I'd just use the generic {{infobox}} template. It went mostly well, but I found I had great difficulty in using multiple columns within the infobox (trying to make the page look somewhat like this), as it usually made the content disappear or messed up the entire page. The closest I can get to making it work is here, but even then the background colour for the content is wrong and if I don't comment out anything below the second databox it breaks the entire page. I suspect there's something wrong with Second Battle of Hoover Dam/belligerents page as each table seems to work on its own but breaks when used on the page with any other table, but again I have no idea what. I'd appreciate it greatly if someone with better knowledge of wiki markup could take a look and see what's wrong, and I'd be willing to try something other than tables entirely if anyone can think of a more elegant solution (unfortunately I can't). The affected pages are:

--Flower of Pock-Lips 15:51, February 9, 2011 (UTC)

The meta-template isn't really intended for being used directly in articles. It'd be better to create a new infobox template (e.g. {{Infobox event}}). If you could compile a list of fields you need I'll create one tomorrow. -- Porter21 (talk) 18:06, February 9, 2011 (UTC)
That's much appreciated! The parameters are:
desc
partof (linked to titlehead)
extra
image
name
px (recommend setting this to default at 300px rather than the standard 240px to accommodate extra space due to multiple columns)
place
result
date
combatants (this would require more than one column and {{tl|data2row}} and {{tl|data3row}} didn't leave room so I was trying to put them in a table under a {{tl|dataheader}}, wikipedia use combatant1, combatant2 etc. but I'm not sure if this would make things easier or harder)
commander (same as above)
strength (as above)
casualties (as above)
This is specific to military conflicts, it could be expanded to events generally to create even greater consistency with infobox use across the wiki but I can't think of any parameters we would use. Thanks again, --Flower of Pock-Lips 00:22, February 10, 2011 (UTC)
Wookiepedia have a working template here and if I'm right in thinking that they have the same version of MediaWiki and same extensions as us, it might be worth looking at that. Sorry I can't be of more use, I'm not used to working with tables and templates, especially not together :/ --Flower of Pock-Lips 00:29, February 10, 2011 (UTC)
We use our own infobox meta-template, so most infoboxes you'll find on other wikis likely do not work here without modification. In any case, just finished {{Infobox event}} - please let me know if you run into any issues :) -- Porter21 (talk) 16:41, February 10, 2011 (UTC)
Issues I've had:
  • The value of the 'date' parameter appears in place of the value of the 'result' parameter.
  • The 'leaderx' parameters fails to produce a result.
  • The value of the 'prev' parameter will be blank if there is not a value set for 'next'.
Other than that, it works fine and looks great, thanks very much for your help! --Flower of Pock-Lips 17:58, February 10, 2011 (UTC)
You're welcome ;) The issues above should all be fixed now; I've also renamed "conc" to "concurrent" and "prev" to "previous" so the naming corresponds to other infoboxes using similar fields. -- Porter21 (talk) 18:12, February 10, 2011 (UTC)

Other Wikia wikis

Random Wiki