Template:Infobox

From Drama Chaser
Revision as of 23:10, 25 April 2024 by Coreo (talk | contribs) (adding header to noinclude)


Building notes

This is our initial practice infobox template. It should take the page title as its title, it has room for an image, etc.

The template offers the fields infobox-title, infobox-image, name, age, hometown, sign, and blood type as example fields.

Infobox code itself starts with the if statement after the table class element, and defines the first parameter to fill out in the infobox, in this case age.

In this code, infobox-title is doing the work of a name field, so I took out an explicit name field, but we could define a separate name field. We could also add logic to make the use of the infobox-title part optional, if we want. Right now it seems to be included automatically, and I think using it will work on all of the infoboxes we want to implement.

At this point I have all of the parameters, Age, Hometown, Sign, Type loading.

Infobox-image isn't loading, however. And I am still trying to understand how the infobox-title part and PAGENAME in brackets actually work, as well as the image stuff. That having been said much of this template is working and is modifiable to create other infoboxes! Back to the template syntax mines I go!


Infobox