Changes - Diablo Wiki
Open main menu

Diablo Wiki β

Changes

Help:Template

1,008 bytes added, 10:55, 15 August 2008
How does it work?
== 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.  == Template features ==Templates work like any other wiki page, and you can use any formatting that you can use elsewhere. In addition, there 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 is great for sorting the template into categories, as well as making some instructions for other users of your template on how it works. This is especially important if the template is more advanced or complex. The "includeonly" tag is also usually used when making help pages, and helping the way to explain template functionality by removing complex code from sight.  
You can ask one of the DiabloWiki sysops for more information.
12,486
edits