Forum:Help Learning how to make a Template

Hey, I'm trying to figure out how to make an infobox template to my liking. I know you guys must have a BUNCH of "How do I make templates" questions, but I feel this one may have some unique problems. I want to make a infobox for a reptile wiki, you see. I want it to look something like this:

It looks nice, but theres a problem --- I have no clue how to do that! I looked at the Template: Infobox and looked at it, but I still had no idea how to do what I wanted it to do. How do I make it my color scheme? How do I make it have banners? How do I make the top banner round slightly? And how do I make some parts split apart like that? Sorry if I'm asking so many questions, but I looked around on every single How to make templates article on nearly every wiki I could find, and the results were either not there, or VERY vague. Could someone tell me how to do this? Thesaurus Rex 17:11, April 21, 2010 (UTC)


 * Looks pretty much just like the creature infobox on SporeWiki (look at w:c:spore:Grox for an example). Feel free to copy (template code, css and js is needed). Ask if you're unsure how. 17:23, April 21, 2010 (UTC)


 * Tip - As Ose says copy something similar from another Wiki to your wiki as is & save it. Then see if it still works ok (ignore red article links). Then open it up to edit and look for the bits that create the heading words and row lables and experiment with changing them to text that suites your usage. Use preiew to check and save when you have some working (then if it goes wrong you can take a step back). For colour codes there is a page on wikipedia that lists them web colors IIRC. You then need to update the parameter elements that pass the dat to the template -
 * in the template and "|item_one = " on the page the template is used on. Updating each one to make sense to your users so it easier to fill in.


 * Some items will only show if the parameter is filled in when the template is used, and auto blank the row label if no data is supplied.


 * Look out for missing sub templates seen as a red Templae:xyz link within the template when displayed on the page or at the bottom of the edit page during preview were it shows as " template:xyz {edit] in red.


 * Note:- your sample there has collapsible sections which may need additional code adding to your wikis Mediawiki:Common.cs and .JS files as Ose mentions to get them to function.


 * - BulldozerD11 19:10, April 21, 2010 (UTC)


 * I threw together a how-to at w:c:dev:CollapsibleInfobox. If you follow the instructions it should work (you'll need to be an admin to edit the common css and js files, see Project:Adoption requests for that). 20:23, April 21, 2010 (UTC)
 * Hi, I went and took a look at the Infobox (collapsible) template you had, but when I saw it's edit page, it was so incredibly complex that I couldn't make it out . I don't know how to modify THAT! How did you even make that??? Is all that extra code a result of you typing something a bit more basic and having it unfold (like the four tildes in a signature), did you type all that out, or am I just reading this wrong? All this is very discouraging for someone like me. Is there no easy way to learn templates? All the articles on them I've found either list existing templates, some techniques, etc. I have yet to find a good tutorial. But I'm going to try to experiment with what I have, it it doesn't make my brain explode before I get something right >.> Thesaurus Rex 07:50, April 23, 2010 (UTC)


 * The extra code is there because Ose wanted to make sure that the template wouldn't run out of rows. :P As a result, there are dozens of rows. He's coded each row using a parser function, which basically means that unless you are actually using that row (you've entered something in it), it won't show up. The stuff inside the the curly brackets e.g.  are parameters for using the template.
 * Certainly, that template isn't too hard to use; Ose's explanation basically means you can have headers and labels etc. if you just take that template without changing it around too much (and add the extra stuff as detailed on the explanation to Common.js and Common.css). If you do want to create something like that, then they're all that complex, unfortunately. If you're interested though, you can start reading at Help:Templates, Help:Creating templates, Help:Template parameters and Help:Infobox. The 888th Avatar   (talk)  08:29, April 23, 2010 (UTC)