Difference between revisions of "Category talk:Standardization Templates"

From Twilight Heroes Wiki
Jump to: navigation, search
m
(location template needed)
Line 4: Line 4:
  
 
Thanks! I'm making templates for assembling and welding and other such things. --[[User:Livia|Livia]] 14:58, 10 March 2008 (MST)
 
Thanks! I'm making templates for assembling and welding and other such things. --[[User:Livia|Livia]] 14:58, 10 March 2008 (MST)
 +
 +
It might be wise to add in a location template with "Prerequisite" "Combat Adventures" "Rare Adventures" "Non combat Adventures" & "One-time Adventures" would be a good start.--[[User:Reaper|Reaper]] 14:25, 10 July 2008 (MST)

Revision as of 13:25, 10 July 2008

How does one create a template? --Livia 21:29, 1 March 2008 (MST)

Do a search for template:template name here, no space before or after the colon. That'll bring up a page you can edit. Use the <includeonly> and </includeonly> tags to surround your template code. Variables are inserted by {{{variable name here}}} or, alternatively, just put a 1, 2, 3, etc. where variable name is. That will allow you to not have to define what the variable is, in this way: {{template name here|x|y|z}}. In that example, x would go to the first variable, y would go to the second, z to the third, etc. You can use {{#if: {{{variable name here|}}}|do this}} which will put whatever is after the second | into that place in the code only if the variable is defined on the page you call the template on. You can use {{#switch: {{{variable name here|}}}|x=1|y=2|z=3|(and so on)}} to make the template insert 1 if the variable is defined as x, 2 if defined as y, 3 if defined z. In case it needs to be stated, you can make x, y, and z anything you want, and you can make 1, 2, and 3 anything you want. There's also a #ifeq command, but I'm not 100% sure what it does. If you need help with anything else, Valera can probably help you more. - Satan

Thanks! I'm making templates for assembling and welding and other such things. --Livia 14:58, 10 March 2008 (MST)

It might be wise to add in a location template with "Prerequisite" "Combat Adventures" "Rare Adventures" "Non combat Adventures" & "One-time Adventures" would be a good start.--Reaper 14:25, 10 July 2008 (MST)