Help:Templates: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search
No edit summary
m (→‎Transclusion and substitution: Clearing up what appears to have been a tiny typo/mixup. Generally templates should not be transcluded? No, rather generally they should not be substituted...)
 
(31 intermediate revisions by 9 users not shown)
Line 2: Line 2:
:''See also: [https://www.mediawiki.org/wiki/Help:Templates Help:Templates on MediaWiki]''
:''See also: [https://www.mediawiki.org/wiki/Help:Templates Help:Templates on MediaWiki]''


'''Templates''' are just that: templates that can be used on any page to standardize some element. There are many kinds of templates, each serving a different goal.
A '''template''' is a page made to be included in other pages. They standardize content or formats that need to be repeated on many pages, by encapsulating them in a separate page in the <code>Template</code> {{Dict|namespace}}. They can abstract away complicated syntax, namely {{Mediawiki|parser functions}}.


Essentially, a template is a separate page in the "Template" [[Help:Glossary#Namespace|namespace]]. By including the name of that page enclosed in '''<nowiki>{</nowiki>{two curly brackets}}''' and placing it on another page, the entire contents of that template page will be displayed on the page you've posted it on - this is called [[Help:Glossary#Transclusion|transclusion]]. Many templates have [[Help:Glossary#parameter|parameters]], or fields, that modify its appearance and content.  
Templates are most often used by {{Mediawiki|transclusion}}. That is, by enclosing the name of the template page in <code><nowiki>{{double curly brackets}}</nowiki></code>. When placed in another page, the entire contents of that template page will be displayed where you placed it. Templates can have {{Dict|parameter}}s that modify their appearance or content.


== Types of Templates ==
An example of a common template is an '''infobox''', such as [[Template:Infobox Item]]. Infobox templates appear in the upper right corner of nearly every article on the wiki. There are many other [[/Types|types of templates]].
=== Navigation Templates ===
:''See all [[:Category:Navigation Templates|navigation templates]]''
Navigation templates are used to link together pages with related subjects, for the benefit of readers. As the name suggests, they facilitate navigation between these pages. They are typically placed at the bottom of the page. Navigation templates contain little or no parameters to modify.


Examples of navigation templates include {{[[Template:Songs|Songs]]}} or {{[[Template:Pickups|Pickups]]}}. [[Help:Glossary#Image map|Image maps]] are useful for making navigation templates such as {{[[Template:STNavMap|STNavMap]]}}.
==Using Templates==
===Parameters===
Templates can have anonymous parameters, named parameters, or both. With anonymous parameters, order matters.


=== Infobox Templates ===
[[Template:Color]] is a template with anonymous parameters. It is used like this: <code><nowiki>{{Color|TWWHD Vermilion|merchant's oath}}</nowiki></code>, which produces {{Color|TWWHD Vermilion|merchant's oath}}. You wouldn't get the right output if you changed the order of the parameters.
:''See all [[:Category:Infobox Templates|infobox templates]]''
Infobox templates - typically placed near the top of the page, beneath notice templates - provide a summary of the article's subject. Each infobox template will have several specific fields which cover topics relating to the subject. For example, {{[[Template:Game|Game]]}} has fields for the game's release date, the publisher, the ESRB rating, etc.


=== Formatting Templates ===
[[Template:Clarify]] is a template with both anonymous and named parameters. It is used like this: <code><nowiki>{{Clarify|BotW|reason= Some text here}}</nowiki></code>. There's one anonymous parameter for the game, and a named <code>reason</code> parameter for the display text.
:''See all [[Help:Template List|formatting templates]]''
Formatting templates help standardize of formatting across the Wiki - they essentially mold what you've written to appear a certain way. An excellent example would be the {{[[Template:Cite|cite]]}} template; it ensures that all in-game citations in references appear the same throughout the entire site. These templates also make formatting quicker and simpler - take the [[Help:Template_List#Game_Shortcuts|game shortcuts]], for example.


Formatting templates may contain extra parameters to modify.
===Transclusion and substitution===
Templates can be used by {{Mediawiki|transclusion}} or by {{Mediawiki|substitution}}. When you '''transclude''' a template on a page and save it, the source will still show <code><nowiki>{{<Template name>}}</nowiki></code> when you go back to edit it. Conversely, when you '''substitute''' a template, the actual contents of the template gets copied and saved to the page.


== Making a Template ==
{| class="wikitable"  
The easiest way is to add '''<nowiki>{</nowiki>{your template name}}''' to the [[Zelda Wiki:Sandbox|Sandbox]], and click on the red link that appears. From there you can create your template, which is most easily done by copying and pasting the code from a similar template; then you can just modify it.
|+ Transclusion vs. substitution after saving the page
 
! Input !! Output view !! Output source
Make sure that at the end of the last line of the ACTUAL TEMPLATE you add <nowiki><noinclude></nowiki> to begin any section detailing how to use the template, and also the add the necessary category for that template. '''Do not''' finish the template, create a new line, and ''then'' add the <nowiki><noinclude></nowiki> tag.
 
===Testing a Template===
When editing a template, a "preview page with this template" option will appear on the edit form. In the "page title" box, enter the name of a page that currently uses the template and pressing the adjacent "show preview" button. This allows you to preview the template as it would appear on that page if you saved the edit.
 
[[Help:Glossary#Sandbox|Sandboxed]] templates can also be tested on pages using [[Special:TemplateSandbox]].
 
Please refer to [https://www.mediawiki.org/wiki/Extension:TemplateSandbox#Usage MediaWiki] for more information on this feature.
 
== Examples ==
{| class="wikitable" border="1" cellpadding="2"|-!
!colspan=3| '''Notice Templates'''
|-
! What to type !! What it's for !! What it makes
|-
|<pre>{{Accuracy}}</pre>
| Alert readers to disputed accuracy.
| <center><div class="messagebox" style="width: 33em; border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}">
<div style="float: left;">[[File:Stop hand.png|40px| ]]</div>
<div style="margin-left: 50px;">'''The factual accuracy of this article or section is [[Accuracy dispute|disputed]].''' <br> Please see the relevant discussion on the article's talk page.</div>
<div style="clear:left"></div></div></center>
|-
|<pre>{{Ambig}}</pre>
| Alert readers to ambiguous canon status.
|<font size=3 color="#dc51ff"><b>Ambiguously Canon Content!</b></font> '''''Be advised that the following article or section contains ambiguously canon content, which has been unconfirmed by Nintendo.'''''
|-
|<pre>{{Archive}}</pre>
| Alert readers to read but not edit the archive.
| <div class="boilerplate metadata" id="stub" width=100% style="margin: 12px 0px;background-color: #{{ZWheader}}; border: solid 1px #{{ZWborder}}; padding: 5px;">
:<i>This page is an '''archive'''. The contents have been moved from another page for reference purposes only, and should be preserved in their current form. Discussion or voting on this page is '''not current'''. Please '''do not''' add new comments to this page because they probably won't be noticed by anyone. Instead, direct any comments to the '''current talk page'''.</i>
</div>
|-
|<pre>{{Archives}}</pre>
| More like a nav template to get to archived versions. (Note: It floats to the right.)
| <div class="messagebox" style="width: 11em; border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}; float: right; -moz-border-radius:20px;">
<div style="margin-left: 37px;"><div style="float: center;">[[File:Zwlogo2dlarge.png|60px]]</div></div>
<div style="margin-left: 8px; margin-bottom: 8px;"><b>&nbsp;&nbsp;Archives:</b><small>
</small></div>
<div style="clear:right"></div></div>
|-
 
|<pre>{{Cleanup-date}}</pre>
| Alert editors to dirty articles?
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em .9em"><center>'''To meet Zelda Wiki's [[Zelda Wiki:Quality Standards|quality standards]], this article or section may require [[Wikipedia:Cleanup|cleanup]].''' <br /><span style="font-size: 90%">
Please discuss this issue on the talk page. [[Help:Contents|Editing help]] is available.<br />This article has been tagged since '''{{{1}}}'''.</span></center></div>
|}
|-
 
|<pre>{{Copyvio}}</pre>
| Alert editors to potential copyright issues.
|
{| cellspacing="3" align="center"
|- valign="top"
|width="100%" class="MergeTemplate" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em .9em">
[[File:Warning.png|61px|left]]'''The content of this article may have been taken from another website, such as [[Wikipedia:Main Page|Wikipedia]], or is a [[Wikipedia:Copyvio|copyvio]].<br>Please rewrite or reformat this article completely to comply with Zelda Wiki's [[Zelda Wiki:Quality Standards|quality standards]].''' <br /><span style="font-size: 90%">Please discuss this issue on the talk page. [[Help:Editing|Editing help]] is available.</span>
</div>
|}
|-
| <pre>{{Imdel}}</pre>
| Alerts staff to an image to be deleted, and a reason.
| <div style="padding-bottom: .3em; margin: 0 .5em .5em"></div>
{| cellspacing="3" align="center"
|- valign="top"
|width="100%" class="MergeTemplate" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em .9em">
<div class="messagebox merge">[[File:Midna03.png|50px|left]] It has been suggested that this image be deleted because it {{#switch:
|sup=is superseded by <b>[[:File:{{{2}}}]].
|cv=is a copyright violation.
|df=is a duplicated file of <b>[[:File:{{{2}}}]].
|ic=contains inappropriate content.
|lq=is of low quality.
|un=has an unacceptable filename.
|uf=is an unused file.
|ur=was requested by the uploader.
|#default=meets Zelda Wiki's [[Zelda Wiki:Quality Standards|deletion standards]].}}<br> Discuss this on the image's talk page.</div>
|}
|-
| <pre>{{Delete}}</pre>
| Alerts staff to an article to be deleted, preferably after seeking consensus.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em">
<center>
This
{{#switch:{{NAMESPACE}}|Image=image|Template=template|Template talk=template talk page|User=user page|Talk=talk page|Image talk=image talk page|User talk=user talk page|Category=category|Category talk=category talk page|#default=article}} contains criteria suitable for ''deletion''
under Zelda Wiki's [[Zelda Wiki:Quality Standards|deletion standards]].
Discuss this on the talk page, and if appropriate for the {{#switch:{{NAMESPACE}}|Image=image|Template=template|Template talk=template talk page|User=user page|Talk=talk page|Image talk=image talk page|User talk=user talk page|Category=category|Category talk=category talk page|#default=article}}, please {{#switch:{{NAMESPACE}}|#default=<b><span class="plainlinks">[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} improve it]</span></b>
|User=<b>improve it</b>|User talk=<b>improve it</b>|Talk=<b>improve it</b>|Image=<b>improve it</b>
|Image talk=<b>improve it</b>|Template talk=<b>improve it</b>|Category=<b>improve it</b>|Category talk=<b>improve it</b>}} in a beneficial manner, in order to continue the life of the {{#switch:{{NAMESPACE}}|Image=image|Template=template|Template talk=template talk page|User=user page|Talk=talk page|Image talk=image talk page|User talk=user talk page|Category=category|Category talk=category talk page|#default=article}}.<br>
{{#ifeq:|{{Void}}|<span style="font-size: 90%">This {{#switch:{{NAMESPACE}}|Image=image|Template=template|Template talk=template talk page|User=user page|Talk=talk page|Image talk=image talk page|User talk=user talk page|Category=category|Category talk=category talk page|#default=article}} has been flagged for deletion since <b>{{#switch:{{REVISIONMONTH}}
|1=January
|2=Feburary
|3=March
|4=April
|5=May
|6=June
|7=July
|8=August
|9=September
|10=October
|11=November
|12=December
}} {{REVISIONDAY}}, {{REVISIONYEAR}}</b></span>|<span style="font-size: 90%">This {{#switch:{{NAMESPACE}}|Image=image|Template=template|Template talk=template talk page|User=user page|Talk=talk page|Image talk=image talk page|User talk=user talk page|#default=article}} has been flagged for deletion since '''{{{1}}}'''.</span>}}
</center>
</div>
|}
 
|-
| <pre>{{Disambig}}</pre>
| Alerts viewers to the ambiguous search term, no article should link to these.
| ----
----
<div class="notice metadata" id="disambig">
{|
|style="vertical-align:middle;"|''This is a [[Wikipedia:Wikipedia:disambiguation|disambiguation]] page: a list of articles associated with the same title. If <!-- you are viewing this online as opposed to as a [[hard copy]] and -->an [[Special:Whatlinkshere/{{NAMESPACE}}:{{PAGENAME}}|internal link]] referred you to this page, you may wish to change the link to point directly to the intended article.''
|}
</div>
----
----
 
|-
| <pre>{{Ex-Featured}}</pre>
| Alerts viewers to the previous featured status of an article.
| [[File:Crest of Hyrule Broken.png|25px]]
|-
| <pre>{{Fact}}</pre>
| Notifies editors that a source is needed for a statement.
| {{space|thin}}<sup title="The text in the vicinity of this tag needs citation." class="noprint">&#91;[[Help:Citing Sources|''citation&nbsp;needed'']]&#93;</sup>
|-
| <pre>{{Featured}}</pre>
| Boasts the Featured Article status for the article.
| [[File:Crest of Hyrule.png|25px]]
|-
| <pre>{{Future game}}</pre>
| Use on content concerning unreleased material.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em">
[[File:Clock.png|left|Tick tock...]]
'''This article or section contains information about an unreleased [[:Category:Games|video game]].'''<br />It is likely to contain information of a speculative nature, and the content may change dramatically as more information becomes available.
</div>
|}
 
|-
| <pre>{{Gallery}}</pre>
| Use to send viewers to the image gallery for the article.
|
{|style="width:150px;margin-top:+.7em;align:'center';background-color:#{{ZWheader}};border:1px solid #{{ZWborder}}"
|-
|style="text-align:left;align:center" |
<div style="font-size:130%;border:none;margin:0;padding:.1em">
[[File:Picto Box TWW.png|62px|left]]<br>'''[[Gallery:{{{1}}}|View Gallery]]'''
</div>
|}
|-
| <pre>{{Guide}}</pre>
| Notifies editors to remove the strategy guide style of the article.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em">
<center>
'''This {{#switch:|{{Void}}=article|section=section}} is written like a strategy guide.'''
Please <b><span class="plainlinks">[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} improve it]</span></b> by re-writing the necessary portions to read as more encyclopedic.<br>
<span style="font-size: 90%">This {{#switch:|{{Void}}=article|section=section}} has been flagged since '''{{{2}}}'''.</span>
</center>
</div>
|}
 
|-
| <pre>{{Howtosig}}</pre>
| A message to send people that do not sign talkspace posts.
| == Signatures ==
Hello! I noticed that you seem to be having some trouble with the signature coding — don't worry, it happens a lot. You only need to type one thing:
:<b><big><nowiki>~~~~</nowiki></big></b>
That's it. Just those four tildes. They automatically add your name and the time you made your post when you save the page, so you don't have to type any of that yourself! Hope this helped, and thank you for your contributions!
 
If you still have questions, feel free to ask me on my talk page!
|-
| <pre>{{Hi}}</pre>
| A message the bot will send to all new users.
| == Hello ==
{{Hello}}
|-
| <pre>{{Images}}</pre>
| Post on articles lacking images.
|
{| cellspacing="3" align="center"
|- valign="top"
|width="495px" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
[[File:Picto Box TWW.png|62px|left]]It has been requested that '''image(s)''' be added to this page or section.
<span style="font-size: 80%">See [[Help:Images]] for assistance. Please remember to <span style="text-decoration:underline">remove</span> this template once the image(s) have been added.</span>
</div>
|}
 
|-
| <pre>{{Improve}}</pre>
| Alerts editors to the poor quality of the article.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
<center>
[[File:Tingle Ill TRR.png|This article could use some TLC.|63px]]'''This article or section is in need of attention.'''
Please <b><span class="plainlinks">[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} improve it]</span></b> in any way you see fit.<br>
<span style="font-size: 90%">This article has been flagged since '''{{{1}}}'''.</span>
</center>
</div>
|}
 
|-
| <pre>{{Incomplete Coding}}</pre>
| Not all browsers are equal. Some users may place this on articles that seem fine, but are a mess in their browser.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="475px" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
[[File:PH Link 01.png|80px|left]]
<center>
'''This page contains incomplete, unclosed or incorrect wiki coding, which is causing the page to distort and look unprofessional. Please check this page and <span class="plainlinks">[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} correct]</span> any coding errors that are found.'''
</center>
</div>
|}
 
|-
| <pre>{{Intro}}</pre>
| Beckons editors to write an introduction to an article.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
<center>
[[File:PhTetra1.png|This article could use an intro.|55px]]'''This article is in need of an ''introduction''.'''
</center>
</div>
|}
 
|-
| <pre>{{Merge}}</pre>
| Proposes articles to be merged and asks for discussion on the matter.
| <div style="padding-bottom: .3em; margin: 0 .5em .5em"></div>
{| cellspacing="3" align="center"
|- valign="top"
|width="100%" class="MergeTemplate" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em .9em">
<div class="messagebox merge">[[File:Pair Kinstones.png|left|40px]] It has been suggested that this article or section be [[Wikipedia:Merging and moving pages|merged]] with {{Pagelist|delim=''||||||||||||||||||||}}. Discuss this on the article's talk page.</div>
</div>
|}
|-
| <pre>{{Move}}</pre>
| Use to recommend moving a page to a new title.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="600px" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em">
<center>
[[File:Warning.png|52px|left]]
'''It has been suggested that this article be moved to [[{{{1}}}]]'''<br /><small>This page either  already exists and is preventing the move, or the move may be either controversial or entail multiple edits. Please discuss this on this article's talk page.</small>
</center>
</div>
|}
 
|-
| <pre>{{Name}}</pre>
| Use at the first bolded instance of a conjectural article name.
| {{space|thin}}<sup title="The title of this article needs a source/citation." class="noprint">&#91;[[:Category:Articles_with_conjectural_titles|''conjectural&nbsp;title'']]&#93;</sup>
|-
| <pre>{{Neutrality}}</pre>
| Notifies editors of potential bias on a subject.
| <div class="messagebox" style="width: 33em; border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}; margin: auto; padding: 0.5em;">
<div style="float: left;">[[File:Two Links.png|80px| ]]</div>
<div style="margin-left: 50px;">'''The neutrality of this article or section is disputed.'''<br>
Please see the relevant discussion on the article's talk page.</div>
<div style="clear:left"></div></div>
 
|-
| <pre>{{News Archive}}</pre>
| A hybrid notice and navigation template for the News archives.
| <div class="messagebox" style="width: 50em; border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}; margin: auto; padding: 0.5em;">
<div style="float: left;">[[File:Linkfairy.png|100px|Link! Looook!]]</div>
<div style="margin-left: 50px;"><div style="float: right; font-size:8px; width: 8.3%;"><imagemap>
  File:Rss.png
  circle 25 25 25 [http://zrss.stonewatchers.org/index.php?zflist=Zelda+Wiki.org+Feed&zfviewmode=date Zelda Wiki's News Feed]
  desc none
</imagemap></div>
:<i> '''<center><span style="color:#EEE8AA;font-family: Bradley Hand ITC;font-size:Large">He</span><span style="color:#FFFF00;font-family: Bradley Hand ITC;font-size:Large">y!</span> <span style="color:#FFD700;font-family: Bradley Hand ITC;font-size:Large">Li</span><span style="color:#F0E68C;font-family: Bradley Hand ITC;font-size:Large">st</span><span style="color:#FFFF00;font-family: Bradley Hand ITC;font-size:Large">en!</span>'''&nbsp;</font></center>
 
This page is a <b>news archive</b>. The contents have been moved from another page for reference purposes only, and should be preserved in their original form. Content on this page is <b>not current</b>.</i>
<center>'''News Archives'''<br></center><center> [[News 2005]]&nbsp;· [[News 2006]]&nbsp;· [[News 2007]]&nbsp;· [[News 2008]]
</div></div>
|-
| <pre>{{Noclog}}</pre>
| Helps clear out the Wanted Pages.
|
''This template was placed here to prevent this {{#switch:{{NAMESPACE}}|Image=image|Template=template|Template talk=template talk page|User=user page|Talk=talk page|Image talk=image talk page|User talk=user talk page|Category=category|Category talk=category talk page|#default=article}} from clogging up the [[Special:Wantedpages|Wanted Pages]]. Once whichever template created the red-link is removed from the article, or text is entered into this talk page, please remove this template.''
 
 
 
|-
| <pre>{{Noncanon}}</pre>
| Alerts readers to the canon status of the article section.
| ----
<font size=3 color="#00ff00"><b>Non-Canon Information!</b></font> '''''The following article or section is not [[The Legend of Zelda (Series)|Zelda]] [[wikipedia:Canon (fiction)|canon]], and shouldn't be taken as such.'''''
----{{#switch:{{NAMESPACE}}|User={{Void}}|{{#switch:{{PAGENAME}}|#default=|Link={{Void}}|Princess Zelda={{Void}}|Ganon={{Void}}|Pedestal of Time={{Void}}|Dark Link={{Void}}|Wallet={{Void}}|Great Deku Tree={{Void}}|Link={{Void}}|Vaati={{Void}}|Wizzrobe={{Void}}|Four Sword={{Void}}|Crazy Tracy={{Void}}|Gohma={{Void}}}}}}
 
|-
| <pre>{{Nosig}}</pre>
| Identify talkspace posters that did not sign the post and enter their name and edit time.
| <small>{{-}}Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/{{{1}}}|{{{1}}}]] (talk) {{{2}}}</small>
|-
| <pre>{{Nosrc}}</pre>
| A message to editors that uploaded images without sourcing them.
| ==Image(s) uploaded==
Hi! Thank you for the new image(s) you recently uploaded; the wiki appreciates your contributions! We've introduced a policy of crediting the original source of any images used here, so we ask that you please take a moment to let everyone know where your images came from using the various templates [[:Category:Image Templates|here]]. For more information, see [[Help:Image Sourcing|this explanation]], and any questions you may have will be answered by the staff [[Zelda Wiki:Hyrule Castle|here]]. Thanks for your help!
|-
|<pre>{{OT}}</pre>
| Informs talkspace posters that the discussion is not related to the wiki.
| {{OT}}
|-
|<pre>{{Ocarina Song}}</pre>
| Inserts a link to an audioclip of the song being played.
| ----
{|
[[File:Segare Animation.gif|Listen to this song!.|50px]]<font size=3 color="#FF0066"><b>Listen to this song:</b></font> '''{{{1}}}'''
</center>
</div>
|}
----
 
|-
|<pre>{{PolicyConst}}</pre>
| Informs visitors that a specific policy is under construction by the staff.
| ----
----
<font style="text-decoration:underline" color=red><font size=3 style="text-decoration:blink" color=red><b>Under Construction</b></font></font>: '''''The following policy page is currently under construction and it may not yet be in its final form. However, what is already on this page stands as policy until such time the page is updated to include revisions and changes in the policy as decided by staff.'''''
----
----
 
|-
|<pre>{{Protect}}</pre>
| Informs the staff of a page that may need to be protected.
|
{| cellspacing="3" align="center"
|- valign="top"
|width="495px" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
[[File:Nayru's_Love.png‎|left|60px]]
It has been suggested that this page be protected by an [[administrators|administrator]]. 
<center><small>Please remember to <u>remove</u> this template once the appropriate action has been taken</small></center>
</div>
|}[[Category:Protection requested]]
 
|-
|<pre>{{Protected}}</pre>
| Informs editors that a page has been temporarily protected .
| {{subst:Protectd}}
|-
|<pre>{{Split}}</pre>
| Used when suggesting an article be split.
| <div style="padding-bottom: .3em; margin: 0 .5em .5em"></div>
{| cellspacing="3" align="center"
|- valign="top"
|width="100%" class="MergeTemplate" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em .9em">
<div class="messagebox merge">[[File:Zol-Gel.png|50px|left]] It has been suggested that the section of this page, <b>[[#{{{1}}}|{{{1}}}]]</b>, should be made into its own page. Discuss this on {{#ifexist::{{NAMESPACE}} talk:{{PAGENAME}}|<span class="plainlinks">[http://zeldawiki.org/{{TALKSPACEE}}:{{PAGENAMEE}} the article's talk page]</span>|this article's talk page}}.</div>[[Category:Articles to be split|{{PAGENAME}}]]
</div>
|}
|-
|<pre>{{Sync}}</pre>
| Notifies editors of related articles that are out of sync with one another.
| <div style="padding-bottom: .3em; margin: 0 .5em .5em"></div>
{| cellspacing="3" align="center"
|- valign="top"
|width="100%" class="MergeTemplate" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em .9em">
<div class="messagebox merge">[[File:Spirit flute.png|left|40px|You have learned the Song of Common Sense!]] The following text needs to be [[Wikipedia:Wikipedia:Summary style|harmonized]] with text in {{Pagelist|delim=''||||||||||||||||||||}}. Discuss this on {{#ifexist::{{NAMESPACE}} talk:{{PAGENAMEE}}|<span class="plainlinks">[http://zeldawiki.org/{{TALKSPACEE}}:{{PAGENAMEE}} the article's talk page]</span>|the article's talk page}}.</div>
</div>
|}
|-
|-
|<pre>{{Sectstub}}</pre>
| <code><nowiki>{{MM}}</nowiki></code>       || {{MM}}      || <code><nowiki>{{MM}}</nowiki></code>
| Stub tags specific sections of an article, rather than the entire article.
| ----
:<div class="notice metadata" id="stub">''This '''section''' of the page is incomplete. You can help Zelda Wiki by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it]</span>. ''</div>
----[[Category:Articles needing attention]]
|-
|-
|<pre>{{Sources}}</pre>
| <code><nowiki>{{subst:MM}}</nowiki></code> || {{#switch:{{lc:{{{1}}}}}
| Informs editors that the page needs references.
|-        = ''Majora's Mask''
|  
|himekawa = [[The Legend of Zelda: Majora's Mask (Himekawa)|''Majora's Mask'' {{#if:|(Himekawa)|manga}}]] {{#if:||by [[Akira Himekawa]]}}
{| cellspacing="3" align='center'
|item    = [[Majora's Mask (Item)|Majora's Mask]]
|- valign="top"
|object  = [[Majora's Mask (Item)|Majora's Mask]]
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
|#default = ''[[The Legend of Zelda: Majora's Mask|Majora's Mask]]''}} || <code><nowiki>''[[The Legend of Zelda: Majora's Mask|Majora's Mask]]''</nowiki></code>
<div style="padding: .4em .9em">
<center>
[[File:Book of Mudora.png|Crack open the instruction books and start citing.|52px|left]]
'''This article or section does not cite, or does not have enough, [[Citing Sources|references or sources]].'''<br /><small>Please help <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} improve this article]</span> by introducing appropriate citations.</small>
</center>
</div>
|}
|}
{{Small|In reality, [[Template:MM]] outputs something quite different when substituted, but this illustrates the point.}}


|-
Generally, templates should be transcluded and not substituted. Substitution does not preserve a reference to the template—it's like you didn't use a template at all. You lose the ability to have the content update automatically when you change the template.
|<pre>{{Stub}}</pre>
| Tags an article as a stub.
| ----
:<div class="notice metadata" id="stub">'''''This article is a [[Stub|stub]]. You can help Zelda Wiki by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it]</span>. '''''</div>
----
 
|-
|<pre>{{Theory}}</pre>
| Used to distinguish facts from theories in articles.
| ----
<font size=3 color="#FFA500"><b>Theory Warning:</b></font> '''''Be advised that the following article or section contains unconfirmed, fan-made theories or speculation.'''''
----
|-
|<pre>{{Uncon}}</pre>
| A canned message to send a user after reverting an edit by them.
| {{Uncon}}
|-
|<pre>{{Undated}}</pre>
| Similar to the nosig, but specifically for signed, but not dated talkspace posts.
| {{Undated}}
|-
|<pre>{{Update}}</pre>
| Tags an article as being out of date.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="480px" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
[[File:Ocarina of Time.png|80px|left]]
<center>
'''This article or section contains content which is out of date <BR/>and needs to be <b><span class="plainlinks">[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} updated]</span></b> accordingly to be accurate with the present time.'''<br>
</center>
</div>
|}


|-
==Making Templates==
|<pre>{{User}}</pre>
For information on how to ''make'' templates, see [[Zelda Wiki:Making Templates]].
| Filler info on a user page that actually creeps into the wanted pages.
| {{User}}
|-
|<pre>{{Vandalism}}</pre>
| Notifies editors of a constantly vandalized page's protected status.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="100%" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .4em .9em ">
<div style="float: left;">[[File:Fishman.png|100px|left|Hoy! Small fry! Your map's got nothing but ocean drawn on it!]]</div>
<div style="margin-left: 50px;">
'''This page has recently been subject to repeated vandalism, and was protected on '''4-9-2009'''.''' <br>
<span style="font-size: 90%">If you would like to add content, you may request that the page be unprotected on the talk page (if applicable), or alternatively contact one of the active admins listed [[Zelda Wiki:Staff|here]].</span></div>
<div style="clear:left"></div>
|}
|-
|<pre>{{Wikipedia}}</pre>
| Links to the Wikipedia article for input terms.
| {{Wikipedia|Category:Wikipedia maintenance templates|Wikipedia Templates}}
|-
|<pre>{{YouLink}}</pre>
| Flags articles with out of universe speaking style.
|
{| cellspacing="3" align='center'
|- valign="top"
|width="475px" style="border: 1px solid #{{ZWborder}}; background-color: #{{ZWheader}}"|
<div style="padding: .5em .8em .2em">
[[File:Minish Link.png|50px|left]]
<center>
'''This article or section refers to playable characters as ''"you"'', ''"the player"'' or other variations, and needs to be <b><span class="plainlinks">[{{SERVER}}{{localurl:{{PAGENAME}}|action=edit}} corrected]</span></b> to refer to the specific characters.'''<BR/>
<small>For example:''' ''"Ganon attacks you"'' must be changed to ''"Ganon attacks Link."''</small>
</center>
</div>
|}
|}

Latest revision as of 01:41, 19 December 2022

Zelda Wiki's
Help Guide
Basic Editing:

Getting Started
Citing Sources
Images and Uploading
Initialisms
Protected Pages
Redirects
Talk Pages
Templates (Template List)

Guidelines and Policies:

Canon Policy
Editing Etiquette
Image Deletion Policy
Inter-Wiki Policy
Nintendo Article Guidelines
Quality Standards
User Accounts
User Conduct

Advanced Editing:

Archiving Talk Pages
Article Reorganization
Custom Signatures
Keyboard Shortcuts
Merging and Moving Pages
Patrolling
Tables
User Navigation Bars
WikiExclusives

General Information

Staff
User Rights
About
Glossary

See also: Help:Templates on MediaWiki

A template is a page made to be included in other pages. They standardize content or formats that need to be repeated on many pages, by encapsulating them in a separate page in the Template namespace. They can abstract away complicated syntax, namely parser functions.

Templates are most often used by transclusion. That is, by enclosing the name of the template page in {{double curly brackets}}. When placed in another page, the entire contents of that template page will be displayed where you placed it. Templates can have parameters that modify their appearance or content.

An example of a common template is an infobox, such as Template:Infobox Item. Infobox templates appear in the upper right corner of nearly every article on the wiki. There are many other types of templates.

Using Templates

Parameters

Templates can have anonymous parameters, named parameters, or both. With anonymous parameters, order matters.

Template:Color is a template with anonymous parameters. It is used like this: {{Color|TWWHD Vermilion|merchant's oath}}, which produces merchant's oath. You wouldn't get the right output if you changed the order of the parameters.

Template:Clarify is a template with both anonymous and named parameters. It is used like this: {{Clarify|BotW|reason= Some text here}}. There's one anonymous parameter for the game, and a named reason parameter for the display text.

Transclusion and substitution

Templates can be used by transclusion or by substitution. When you transclude a template on a page and save it, the source will still show {{<Template name>}} when you go back to edit it. Conversely, when you substitute a template, the actual contents of the template gets copied and saved to the page.

Transclusion vs. substitution after saving the page
Input Output view Output source
{{MM}} Majora's Mask {{MM}}
{{subst:MM}} Majora's Mask ''[[The Legend of Zelda: Majora's Mask|Majora's Mask]]''

In reality, Template:MM outputs something quite different when substituted, but this illustrates the point.

Generally, templates should be transcluded and not substituted. Substitution does not preserve a reference to the template—it's like you didn't use a template at all. You lose the ability to have the content update automatically when you change the template.

Making Templates

For information on how to make templates, see Zelda Wiki:Making Templates.