Templates Wiki
No edit summary
No edit summary
 
Line 25: Line 25:
   
 
:Additionally, I cannot follow this forum to get email updates when people edit it, so can someone please drop a quick message on my talk page if there's activity here so I can check it? '''[[User:Toon Ganondorf|<span style="color:#00693E">Toon Ganondorf</span> ]] [[User Talk:Toon Ganondorf|<span style="color:#D4AF37">(t</span>]] [[Special:Contributions/Toon Ganondorf|<span style="color:#D4AF37">c)</span>]]''' 10:33, December 5, 2017 (UTC)
 
:Additionally, I cannot follow this forum to get email updates when people edit it, so can someone please drop a quick message on my talk page if there's activity here so I can check it? '''[[User:Toon Ganondorf|<span style="color:#00693E">Toon Ganondorf</span> ]] [[User Talk:Toon Ganondorf|<span style="color:#D4AF37">(t</span>]] [[Special:Contributions/Toon Ganondorf|<span style="color:#D4AF37">c)</span>]]''' 10:33, December 5, 2017 (UTC)
  +
  +
:Actually, this is possible using the <nowiki><gallery></nowiki> tag. Take the following code:
  +
  +
<pre>
  +
<gallery>
  +
PanicAttack.jpg | Panik Attack
  +
Roadblock.jpg | Road Block
  +
</gallery>
  +
</pre>
  +
  +
That would then cause Panik Attack's image to be the default, but allow for a tab called "Road Block" that, when pressed, would show Road Block's image. This can be included as-is above in the images variable without requiring modifications to the main template.--[[User:TwoTailedFox|TwoTailedFox]] ([[User talk:TwoTailedFox|talk]]) 19:15, December 7, 2017 (UTC)

Latest revision as of 19:15, 7 December 2017

Forums: Index Help desk Alternating infobox at the click of a button
Note: This topic has been unedited for 7 years. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


Hi there. I'm looking to add a feature into an existing template on Robot Wars Wiki. 99% of the coding on our Wiki has been me experimenting with trial and error, but this one is beyond me.

Take a robot like Panic Attack.

http://robotwars.wikia.com/wiki/Panic_Attack

Basically there were six versions of the robot ever made. As it is, we can only display one image and one set of statistics; the rest is spread throughout the article.

What I would like is the feature that COD Wiki (and others, but this is the only one I can find) has for the AK-47.

http://callofduty.wikia.com/wiki/AK-47#MWR

See how you can click the "tab" at the top to change from COD4 to MWR? I want to be able to program that onto our Template:Robot. I want all of the information besides the heading to change depending on which tab is selected.

My questions are as follows:

1. Is it possible to have one template that we can then program a number of "tabs". Some robots have one appearance and therefore don't need a tab, and others have 8. 2. Do I need to create two templates, one for non-tab robots and one for tab robots, OR do I need to create 12 templates based on how many versions of the robot there are?

Can someone help me? I'm not even sure what the feature is called, so am lost for where to start. Toon Ganondorf (t c) 10:29, December 5, 2017 (UTC)

Additionally, I cannot follow this forum to get email updates when people edit it, so can someone please drop a quick message on my talk page if there's activity here so I can check it? Toon Ganondorf (t c) 10:33, December 5, 2017 (UTC)
Actually, this is possible using the <gallery> tag. Take the following code:
<gallery>
PanicAttack.jpg | Panik Attack
Roadblock.jpg   | Road Block
</gallery>

That would then cause Panik Attack's image to be the default, but allow for a tab called "Road Block" that, when pressed, would show Road Block's image. This can be included as-is above in the images variable without requiring modifications to the main template.--TwoTailedFox (talk) 19:15, December 7, 2017 (UTC)