Infobox help

Infobox Templates –
Fandom has a designer to create Infobox templates and it does work for just really basic information. The major problem is that you have to manually assign categories and if you don’t know what the categories are or where it should be, it doesn’t get done. Honestly, they rarely are assigned then they can only be found via the shortcuts. The other major problem is that they are only good for simple information display.

Templates can be found Category:Templates, there are additional Categories listed, such as Category:Templates/Infobox which is what this article is about.
If you are going to create a new infobox, please talk to one of the admins first as there may be something already created that will work for what you want.
The easiest option is to then look at the infobox templates that are already created and find one similar to what you have in mind, open it up in Source mode.
If you go ahead, hit the “create new page” icon in the upper right and for article name enter: Template:NewName.
You should now see an editor and if it isn’t in Source mode then you need to change to source mode. All template creations and changes have to be done in source mode.

Ignore the box at the top where it says “Mange Templatedata”.

Go to the already created infobox template that you identified and high-light the entire page, copy and then go to the new template and paste it in the edit area.

**Note:** if you had found yourself in the Infobox design screen, look in the bottom right corner for two very large **[ ]’s** and click on them, that should take you to source mode. Replace any code that is there, with what you are pasting from the existing template.

The following is the infobox for adding an image to an article {{Image}}

```
<infobox>
  <title source="title"/>
	<image source="image"><caption source="imagecaption"/></image>
    <data source="info"/>
	<image source="map"><caption source="mapcaption"/></image>
    <data source="type"/>
</infobox>
<noinclude>{{Documentation}}</noinclude>
```

This next example is from the location template {{location}}

```
<infobox type="Location">
	<title source="title"><default>{{PAGENAME}}</default></title>
	<image source="image"><caption source="imagecaption"/></image>
	<image source="map"><caption source="mapcaption"/></image>
	<data source="nation"><label>Nation:</label></data>
	<data source="type"><label>Type:</label></data>
	<data source="inhabitants"><label>Inhabitants:</label></data>
	<group collapse="open">
              <header>Book Reference</header>
              <data source="books"><label>Books</label></data>
             <data source="stories"><label>Short Stories</label></data>
        </group>
</infobox><includeonly>{{Namespace|main=[[Category:Places]]}}</includeonly>
<noinclude>{{Documentation}}</noinclude>
```

**Infobox opening tag:**

To start an infobox you need the beginning tag <Infobox> one of the examples has a type=Location parameter and the other doesn’t have any parameters. Either is ok, there are a few other options to replace type with, but none of them are used with the infobox except for CSS (Cascading Style sheet) overrides which can only be done by an admin.

**Title:**

The first line in both of these is the title source=”title” line. The tag =”title” doesn’t have to be title, often “name” is used instead. This is the large header at the top. It actually doesn’t have to be at the top, but that is the standard. There may be some reasons to reposition it, but general not. The next line in both of them is the image source and caption source, again they can be anywhere, but standard is to have it just under the header. But if you look at the Book infobox template, the image is not at the top.

**Images:**

Both of these have a second image for a map. It is very important that if you have multiple image source lines, that reference tag (=”xxx”) is different. The first one is image and the second one is map. It actually isn’t normal to have more then one image, but maps are always popular with visitors so when appropriate it is a nice touch. Just because the tag is there, it doesn’t mean you have to have a value entered.

**Data:**

The next line is the data source tag and you will have multiple data source tags. Each one must have a unique tag and it is best to use ones that are self-explanatory. In the image template, there is only the <data source="type"/> which is the easiest way to create a data source line but there is no parameters allowing for anything other text and links.
The Location template has <data source="nation"><label>Nation:</label></data>
Has a label parameter, the text will display before what is entered in that parameter. Btw, the data source name (i.e. “nation” must always be lowercase. There are several additional parameters that can be used in the data source line and fandom as a help article with them all listed. But for a simple infobox, you don’t need them. If you haven’t ever created an infobox before but want to create a complex one for your first time, DON’T DO IT ….. learn to walk before you run. It is best to get the basics down first.

**Groups:**

Grouping some data under a sub heading is a very common and easy option that is often used in infoboxes. The Parameter collapse="open" means that the content will be displayed when the article is initially opened. Omitting the collapse parameter means that the data will always be displayed without the option to collapse it. For small infoboxes like the ones in the examples collapsing the data isn’t that important, but some infoboxes are very long so the person viewing should have the option to close or collapse the info to make the sidebar shorter.

**Closing:**

If you used groups, you must have a </group> to close it. Infoboxes also need a closing parameter. </infobox>

**Finishing up:**

<includeonly>{{Namespace|main=[[Category:Places]]}}</includeonly> is there to assign all of the articles that use that template to a specific category. You can still add additional categories to the articles the normal way, you just wont have to add the one you specify here.

<noinclude>{{Documentation}}</noinclude></pre>, you must have this line for the documentation article. This is a separate, new documentation page that you have to create and needs to be named the same way as the new template, but with a /doc at the end.

i.e. Template:NewName/doc

This is a bit fiddly to get right. The best thing to do is if you use one of the existing templates such as the locations ones as a bases to create your new one, then copy the doc for that template into your new doc article.

Template:location/doc

There are three copies of the template, two with assigned values to some or all of the fields, any field changes you make have to be made in all three spots. What you see here is how a template with assigned values look in source mode on any article page that the infobox is added to it. (but without the

```
 parameters.
<pre>
{{Image
}}

```

Post any questions or let me know if something doesn’t make sense in the comments section and I will try and clarify.

For additional help, visit wikipedia:Help:Infobox