Board Thread:Support Requests - Getting Technical/@comment-6135511-20160604143255/@comment-23989026-20160605131458

SlurExe97 wrote: I'd like to be able to make a code like this too, where when I type one of the variables in the brackets, it automatically sets the colours and the icons for the Infobox and I just need to add the unique info such as stats.

I'd like it so that  and  is tied to. So say, I could select from "Dark" (D) or "Light" (L) and the proper colours will show up. Here are the two pieces of code where I want that to show up:

! colspan="2" style="background-color:; color:; text-align:center; font-size:120%; padding:0.5em;" |
 * - style="text-align:center;"
 * colspan="2" style="padding:0.5em;" | [[File:|250px]]

! colspan="2" style="background-color:; color:; text-align:center; font-size:100%; padding:0.5em;" | The way I achieve this is to have Color and Background as switch templates. I stack all the various element abbreviations so the correct colors/backgrounds are displayed. An example Template:Color ...

Then create switch templates for the other variables. In the infobox template, inbed the switch templates which selects using ... ! colspan="2" style="background-color:; color:; text-align:center; font-size:120%; padding:0.5em;" |
 * - style="text-align:center;"
 * colspan="2" style="padding:0.5em;" | [[File:|250px]]

! colspan="2" style="background-color:; color:; text-align:center; font-size:100%; padding:0.5em;" |