Thread:DevSharma/@comment-5354013-20130910215432/@comment-3271569-20130912164147

It's not that hard than you think. An template is simply an data-layout where you can add data inside. The perfect example is an easy infobox Template:Infobox. The parameters are just information that you display. For example an easy table:

Source:

Now in case of an template we can add some text as an parameter. This mean we create an template with the following source:

So let's say our template name is "MyTableTest". We create the page Template:MyTableTest and pass the above source to this template. Ones you save the template he's ready for action:

On an random page, forum or comment you add the following source (in source mode!!):

{{MyTableTest
 * Header =
 * Headertext =
 * Text =
 * Text2 =
 * }

Well now you have your first template. Here's an example:

{{MyTableTest
 * Header = MyHeader
 * Headertext = MyHeadText
 * Text = Easy
 * Text2 = Zzz...
 * }

For the database their is something else I used and that's switch codes. Basicly the system is buildup with these code to create an kind off variables. Let's name the template "datatest":

Template:datatest

Used Input

Now imaging this would be post of the Terra Dragon page. Than you will see the word "Stone" popup on the location you placed the input. So what the switch code does is checking the name of the parameter. In this case he checks for the pagename. So if it was place on the Nature Dragon page we would not see the word "Stone". We would see the word "Leaves".