Board Thread:New on TrainStation Wiki/@comment-5596770-20140217222504/@comment-5596770-20141123215713

I worked on this a bit today. To refresh everyone:

Template: Template:Infobox_item

Test page: User:Katat0nyx/KataExample2

Reminder: Please do not edit these pages, make suggestions and I will take care of it. I've locked the template page down to registered users. As usual, once we are satisfied with the final product, the template will be locked down to administrator only access. This is nothing personal, but our wiki is very dependent on templates, and we can't risk vandalism on our primary templates.

I disagree with adding themes to Infobox_item. If we want to template themes, they should be separate, because they are fundamentally different. They don't have stats. They have cost, and on top of that, a cost that is discounted in a different way than buildings (Stock Exchange instead of Sam, 20% instead of 10%). If we start considering templates for themes, I would think about templating extensions with them.

The first thing you are going to notice on the example page is the lack of cost data. That is intentional, because Mhommer and I were trying to figure out how to handle items with a tall image. I finally settled on adding an 'image_pad' parameter, which can be specified to pad out the statistics section to match the image height when item images are very tall. Otherwise, the template tries to stretch each statistic row to match the image height and it looks weird.

The cost section has been started, and it will most likely look very similar to the loco and wagon templates, so it should be relatively fast to finish. It's currently absent from the template. I'll get working on that.

I took a different approach to this template, because I figure there will be some time in the future when someone else may wish to view or edit the template. I've added comments. Yes, that's right, comments. I know that's a first for us, but it should help to explain why/how things are done inside our templates.