User blog:StoryGirl83/Collapsible Infoboxes

First off, let's show you the template we are trying to make. The name I am going to use is the one that I will be naming the template on this site. The first one is going to be a comic template. Since I already have a comic template on this site and don't want to delete it so that I can keep the code intact, I will be using a different name.

In this case:

Template:Charmed Comic Issues Infobox

Step One


Usage
This template is for single issues of Charmed comics.

To use this template, enter the following and fill in the appropriate fields. Any field left blank will not show up. Don't forget to include brackets, to make the fields into links.

Category:Templates

Step Two
The first thing I notice is the glaring red link telling me that I'm missing something. In this case: Template:Alternating rows table section The second thing I notice is that the color scheme is all wrong for this site, because it was designed to work with a different site's color scheme. The color's can wait, so let's go find that template.

Fortunately, that's easy enough to find, just type in the template name in the box and get it. I did not mess with any of the codes other than the above one, so hats off to the maker of this code.

Usage
Alternating rows table section allows for the dynamic creation of tables that use alternating styles for odd and even numbered rows, typically in conjunction with a template which generates a table where some rows may not be present every time.

There are two named arguments to this template:
 * os:Defines the CSS style for odd-numbered rows.
 * es:Defines the CSS style for even-numbered rows.

Step 3
More read links. Template:Void It looks a bit blank until you hit edit and even then it's a rather small link.

Step 4
No red links this time, so we go back to the previous template to check it out and discover there is a new red link. Template:1x This one is another simple code.

Step 5
That fixes the Alternating rows table section template, so let’s go back to our original template and take a look at it. It works. Now you get to play with it, put in your colors and make it look the way you want it to look. There are three main background color pieces, the backgrounds for the headings and the alternating lines. There are also colors for the words. You probably have your own set of categories you want to be used. You might want to make this into a different kind of infobox. I took code from several different infoboxes and meshed them together which led to hours of frustration, but I love the results. I will probably play with it some more, maybe make tables within the tables. For now, though, just enjoy.