Msmall92/test template
From DramaWiki
< User talk:Msmall92Comments & hints
Hi, what you did so far is the documentation. The template code is still missing. Read MW:Help:Templates or Wikipedia:Help:Template for an introduction. Look at {{user}} and {{information}} how parameters get passed. The {{user}} template is very simple and uses only one parameter. For the {{information}} template check the edit history and look at the initial version... and how it was "improved".
For a final "person template" you need not only to pass the values through parameters, but you would also need to check the existence of the values (to ignore certain empty paramaters) and the contents of the values (to handle conditional output, e.g. handle language/country specific cases). Finally you will also need some parameter clauses to define what should be transcluded (i.e. the template code) and what not (e.g. documentation, template category, etc.). Maybe creating a "OST detail" template would be an easier task. ;-)
I will give you a hint and will do the first step for you... the passing of the paramaters. I will also put the documentation parts in "noinclude" clauses. So, the docs are included only on the template page but not on pages that use the template. --MoerkJ talk 20:12, 3 December 2014 (UTC)
- Hello! Thank you for doing the first step and for giving me helpful links to better understand how to set-up templates. I really appreciate it.
- I hope you don't mind me deviating from your template code, but I was able to create my own code which was simply copied and pasted from here. Then, I made some changes to the infobox that better suited to DramaWiki's style. But there's one thing that I'm stumped on - is there a code that omits any parameters left blank? For example, my test page has the following parameters left blank: also known as; nicknames; family. I checked the Help page links you provided, but I couldn't find anything.
