18,567
edits
Changes
ADVERTISEMENT
From Diablo Wiki
m
Other uses of the template can be to just add automatic formatting such as styles or classes to text, similar to how CSS works. It could also be a table of stats from the game, which you might want on more than one page.
In some cases, templates can be used with variables, and inside other templates. It might look quite complex, and you shouldn't edit what If you don't grasp yourself, but they often save have made a lot of time in the end, as table that work needs not you would like to be re-done again, include in more than one place and the data may change you can easily create a template for it. An example of this would be edited [[Template:Blacksmith training]] which contains details of how many pages and tomes are needed to train a [[Blacksmith]]. That table is used on all a [[:Special:WhatLinksHere/Template:Blacksmith_training|number of different pages ]]. The [[:Template:Blacksmith_training|template]] was created and the template code <nowiki>{{Blacksmith training}}</nowiki> simply added to the place where the item is showntable needed to appear.
== How does it work?==
In order to create a template, you start a new article, and naming it like this: [[:Template:New Template]]. All the content in that article will then be easily transcluded to any other page through using the code to call it in: <nowiki>{{New Template}}</nowiki>. That template article content will then replace the "<nowiki>{{New Template}}</nowiki>" snippet. Check our [[{{WikiTitle}}:Policy|title naming policies]] for further help.
== Template features ==Other examples of where [[:Category:Templates work like any other wiki page, and you can use any formatting that you can use elsewhere. In addition, there |templates]] are used in Diablo Wiki are two tags you can use for your template:* '''<nowiki><includeonly></includeonly></nowiki>'''* '''<nowiki><noinclude></noinclude></nowiki>'''
Everything you mark to "includeonly" will only be shown on the page where you call it from. Anything outside of this tag will not show on the transcluding page. The "noinclude" works opposite, and anything written in that tag will be shown only on the actual template page ([[:Template:New Template]], for example).
The "noinclude" tag '''<nowiki>{{Waypoint}}</nowiki>''' ...which inserts the following text: ''{{Waypoint}}'' As that is great for sorting the template into categories, as well as making some instructions for other users of your template included on how every page it works. This is especially important if saves having to type the template is more advanced or complexexact same sentence out each time. The "includeonly" tag is also usually used when making help pages Another, and helping the way '''<nowiki>{{Skill_navbox_Diablo_III|DH}}</nowiki>''' will insert a navigation menu which looks like: {{Skill_navbox_Diablo_III|DH}} If a link ever needs changing or a new one added it only needs to explain be updated in that one template functionality by removing complex code from sight.
no edit summary
== What is a Template? ==
A wiki template is instead an article, just like any other, but with the ability to be 'transcluded' embedded onto other pages. This means that if you have made a table with links for all things concerning a given subject, that could be good for navigating, you can take that table, put it into a template, and then just use a wiki template shortcut to transclude that navigation box on all related articles.
If and when any details change only the one template needs to be updated.
* [[Elly]]
* [[:User:MrFrye|MrFryeFlux]]
== All Templates ==