Help:Templates

Our Templates
We are a wiki that depends heavily on Templates. What is a template, you ask? It's basically a shortcut. Template pages use the "Template:" namespace, and contain mostly code. They can be very simple or very complex. Other pages call upon the template through a process called "transclusion," which allows the code to be used on a page without actually having to write it into the page. It's a good way of standardizing the way out wiki works and looks. Because we rely so heavily on these templates, most of them are locked.

However, all users must interact with the templates on an indirect level to edit properly on the wiki. While the template pages themselves contain the code, every single one of our content pages uses those templates to display that content in an aesthetically pleasing way. The templates on every page ask for the variables it needs. For example, the DC Database:Comic Template uses the information that you add to fill out the infobox AND history sections. There is no text on a comic page that is not entered into the template.

Inputting information into a template is not a complicated matter, though it might seem overwhelming at first. All of our templates are formatted in this way:

| Variable     = Input

The space (which we refer to as a "field") on the right of the "=" is where the information that will actually be displayed on the page goes. The variable on the left of the "=" should give you an idea of what you are meant to fill that field with. You cannot add your own variables to pages. Those are written into the template code. If you try, it simply will not display.

Most of the templates have some instructions or further explanation about what kinds of things you are supposed to put into a field. You can see these instructions by clicking the "" icon that appears in the upper right of any page's infobox. They all have them.

Be wary. Many of those fields are subject to something we call "Category Magic", which means that whatever you put into that field will automatically add a category to the page. If you put something weird into one of those fields, we'll end up with a weird category, and someone will end up changing or undoing your edit. Again, the usage information accessible via that "" icon usually has information about which fields use Category Magic.

For a more general explanation of what templates do and how they work, see the big pile of text in the box below!