Help:Templates: Difference between revisions

m
Bot: Automated text replacement (-^ +{{Status|Halopedia}}\n)
No edit summary
m (Bot: Automated text replacement (-^ +{{Status|Halopedia}}\n))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Status|Halopedia}}
A '''template''' is a pre-set piece of text that can be added to a page without having to retype the same text over and over again. This presents an advantage as you only have to change the text on one page and the change will be reflected on every page that contains the template.
A '''template''' is a pre-set piece of text that can be added to a page without having to retype the same text over and over again. This presents an advantage as you only have to change the text on one page and the change will be reflected on every page that contains the template.


Line 6: Line 7:
{{Flood}}
{{Flood}}


==More Uses==
==More uses==
Templates also have other uses; creating awards that are given to exceptional users, welcoming a user to the community, or sorting information in an article.
Templates also have other uses; creating awards that are given to exceptional users, welcoming a user to the community, or sorting information in an article.


When editors come across this page, they should try to fix the article and look for grammar errors. After the person who placed the template is satisfied that the article has been cleaned up, then the line of code will be removed.
When editors come across this page, they should try to fix the article and look for grammar errors. After the person who placed the template is satisfied that the article has been cleaned up, then the line of code will be removed.


==To Insert a Template==
==To insert a template==
To insert a template,  all templates are displayed [[:Category:Templates|on this page]]. The code that inserts a template into an article is always between double curly brackets: <nowiki>{{Insert Template Name Here}}</nowiki>. Example: <nowiki>{{Flood}}</nowiki>
To insert a template,  all templates are displayed [[:Category:Templates|on this page]]. The code that inserts a template into an article is always between double curly brackets: <nowiki>{{Insert Template Name Here}}</nowiki>. Example: <nowiki>{{Flood}}</nowiki>


==Creating a Template==
==Creating a template==
If you feel a need for a template and want to create your own to add to pages then you can create your own. First search that your idea for a template doesn't already exist. Then type "Template:Template Name Here into the search box.  The Search should come up empty with an option to create your own article with the search phrase. Create the Template, save and then add the template by using instructions above.
If you feel a need for a template and want to create your own to add to pages then you can create your own. First search that your idea for a template doesn't already exist. Then type "Template:Template Name Here into the search box.  The Search should come up empty with an option to create your own article with the search phrase. Create the Template, save and then add the template by using instructions above.


==Editing a Template==
==Editing a template==
Before you edit a template be wary of your changes as they will be reflected across many, in the some case dozens of pages. To edit a Template you just type in the search box "Template:Template Name Here". For example, to edit the Flood Template, type "Template:Flood" in the search box.
Before you edit a template be wary of your changes as they will be reflected across many, in the some case dozens of pages. To edit a Template you just type in the search box "Template:Template Name Here". For example, to edit the Flood Template, type "Template:Flood" in the search box.


==Advanced Templates==
==Advanced templates==
Templates can also be custom built for each page that they're used. A good example is a template where every time a template is used, it adds who added it, when, and why. A template can do this by asking for those three "parameters" or values from the template.
Templates can also be custom built for each page that they're used. A good example is a template where every time a template is used, it adds who added it, when, and why. A template can do this by asking for those three "parameters" or values from the template.


Line 43: Line 44:
</pre>
</pre>


===Naming the Parameters===
===Naming the parameters===
You can take this a step further by instead of using a number you name the variable. A good example of a template that uses this method is the ''Infobox [[xbox live]] settings'' template:
You can take this a step further by instead of using a number you name the variable. A good example of a template that uses this method is the ''Infobox [[xbox live]] settings'' template:


Line 86: Line 87:
}}
}}
</pre>
</pre>
Then when we save the page it displays this:
{{Infobox xbox live settings
|name = Team Snipers Xbox Live Settings
|image =
|caption =
|ranked = Yes
|minimumPlayers = 6
|maximumPlayers = 8
|teamCount = 2
|maximumTeamImbalance = -
|minimumPartySize = 1
|maximumPartySize = 4
|bigPartyRestrictions = Yes
|minimumBigPartySize = 3
|maximumBigPartySize = 4
|bigPartyImbalance = 0
}}
{{clear}}


==See also==
==See also==
Line 110: Line 92:


{{Halopedia HAGP}}
{{Halopedia HAGP}}
 
[[Category:Help]]
[[Category:Help|Templates]]