Template:Infobox: Difference between revisions

From Drama Chaser
(more notes to self about testing this template.)
(Documenting where I have gotten to with this template)
Line 3: Line 3:
The template offers the fields infobox-title, infobox-image, name, age, hometown, sign, and blood type as example fields.   
The template offers the fields infobox-title, infobox-image, name, age, hometown, sign, and blood type as example fields.   


I think the if statement looking for a param1 is simple logic saying that if there's another parameter listed at the end it interprets that as the thing coming up next. But I'm not sure.  
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.


The name field is redundant in this infobox, because infobox-title is doing that work. so I'm taking that out.  
In this code, infobox-title is doing the work of a name field, so I took it out, but we could define a separate name field.


Right now the "Age" line and "age" info are not loading on this infobox over in the example, and I cannot figure out why. neither is the infobox-image part. Also I'm confused about why I have such big escapes in some parts of the css, and trying to parse what they really mean.I think I'm using infobox-title wrong but I'm trying to understand what this template form actually Eexpects.
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!


</noinclude>
</noinclude>

Revision as of 23:07, 25 April 2024

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 it out, but we could define a separate name field.

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