Forum:Help With Template Modification

Hello. Could a kindly editor please take a look at this template, and tell me if there is anyway to insert tables into it? I've tried turning the table in question into another template, but doing so seems to negate the switch functionality when it is added into the original template. Any information would be greatly appreciated.

Thank you,

-- 12:44, September 3, 2012 (UTC)


 * Not having looked at your template, but did you use the Template:! instead of vertical lines so as to not interfer with template-parameter syntax?--PedroM (talk) 12:55, September 3, 2012 (UTC)


 * I'm sorry; I don't know what you mean.-- 13:56, September 3, 2012 (UTC)


 * Read up on the template here.--PedroM (talk) 16:15, September 3, 2012 (UTC)


 * The page no longer exists.-- 01:57, September 4, 2012 (UTC)
 * :| Here.--PedroM (talk) 02:13, September 4, 2012 (UTC)


 * Basically, Mediawiki acknowledges a pipe ( | ) as part of a template or parser function before it acknowledges it as part of a table. By using ! in place of the pipes in a table, you're tricking the template that contains the table into not acknowledging it as an argument delimiter, while the table's behavior does not change.


 * Alright. So, which pipes in the table do I need to replace with ! then? And after doing so, I would be able to insert that table into this template, without breaking both?-- 03:21, September 4, 2012 (UTC)

Any pipe that doesn't separate arguments (i.e. parameters) needs to be replaced with !. And it should work, unless there's some other factor messing it up.


 * I'm very sorry, but inserting the table still seems to break the original template. Turning the table into a template itself and inserting that also hasn't made any visible changes. Either the template ceases to function, or the table is not switched out when it should be.
 * -- 11:03, September 8, 2012 (UTC)


 * You should provide diff links to the edits you're referring to. I guess here you mean this edit? That was not what I meant you to do. You just made your rows all headers (mediawikiwiki:Help:Tables). Instead, you need to replace those pipes with template calls to Template:!; read metawikipedia:Help:Table.--PedroM (talk) 13:35, September 8, 2012 (UTC)


 * I apologize; I have done a poor job of communicating. I have now created a proper table using !. However, whether I use the table directly, or create it separately as a template first, the function of the main template is still not working. See here.
 * -- 14:26, September 8, 2012 (UTC)


 * Can you define "working"? I've looked at your sandbox and I can't tell which version "works" - if any. And what is this "switch" you're going on about? You don't mean a #switch do you? --


 * None of the versions on my sandbox page work properly. If you look at the template itself, by clicking on the different links, the content beneath the line should get switched with each button. However, trying to insert a table into the template seems to break it at, as the table either does not appear (when added directly (Version 3)) or does not get switched out (when added as a template (Versions 1 and 2)).
 * -- 16:07, September 8, 2012 (UTC)


 * Okay. And what effect is that supposed to have on your table? Or is there one table each for "Miscellaneous | Sword | Martial Arts | Magic | Mental | Biological | Boss | Gun | Ninja | Shōnen"? --


 * Well... If I understood your problem correctly, then w:c:medakabox:Template:Toggle was the problem. It featured span-tags instead of div-tags. Spans are inline tags. Tables are block tags. Placing block tags in inline tags is never a good idea. I replaced the spans with divs and it seems to work now. --

Thank you! That's done it. This has been a very informative experience; thank you PedroM, Dzylon, and Pecoes, both for your help, and for your patience.

-- 02:05, September 9, 2012 (UTC)